Ok, here is just another couple of points.
If I is an ideal of a ring R, then I is first and foremost an additive subgroup of the group (R, +).
Since $Z_{12} = <1>$ is a cyclic subgroup under addition. There is exactly one unique subgroup of size p where p is a divisor for 12. So the divisors are 1,2,3,4,6,12And these additive subgroups are (Subgroup of 1 element)$<1^{12/1}>$,(Subgroup of 2 elements $<1^{12/2}>$, (Subgroup of 3 elements)$<1^{12/3}>$ etc...
All these additive subgroups (Denoted by S) are ideals of $Z_{12}$ for if $ r \in Z_{12} $ and $ x \in S $ then x*r = r * x = x + x + x + x.. + (r times) $\in S$ (since S is closed under addition).
It is not hard to show that for any cyclic ring R(Ring with a cyclic group under addition), the ideals of R are the subgroups of (R,+), Hence ideals of size p where p divides the order of R
Now for any ideal I of $Z_{12}$, the order of $Z_{12}/I$ is $12/d$ where d is a divisor of 12. So yu have order of $Z_{12}/I$ = 1,12,6,4,3,2. So we know for I to be maximal $Z_{12}/I$ must be a field, or must have order $p^n$ where p is a prime and n is a positive integer. so the ideals where the order of $Z_{12}/I$ = 4,3,2. are maximal ideals. Or maximal ideals are 3$Z_{12}$,4$Z_{12}$ $6Z_{12}$.
Thus these are also prime ideals.
The others, namely, $Z_{12}/2Z_{12} \cong Z_6$, is not a prime ideal because 2*3 = 0 $\in Z_6$, which means it has atleast one zero divisor. and $Z_{12}/12Z_{12} \cong Z_{12}$ $\{e\}$is also not prime since 6*2 = 0 $\in Z_{12}$(We do not include the ideal $Z_{12}$ in consideration for being a "prime" ideal, akin to how we don't say 1 is a prime number.