The ideal (6) of multiples of 6 in Z is not a prime ideal: 2 * 3 = 6 and neither 2 nor 3 is a multiple of 6.
For every prime number p the ideal (p) of multiples of p in the ring Z is maximal: if an ideal J strictly contains p then it contains an integer m which is not a multiple of p. But then p and m are relatively prime and, by the extended Euclidean algorithm, there is a relation am + bp = 1. But this implies that 1 is contained in the ideal J and that J = Z. Hence each ideal that strictly contains (p) coincides with Z, so (p) is maximal.
The ideal (0) in Z is prime but not maximal: for example,
the ideal (2) is proper and contains (0).
If n is prime, then, as Z/nZ is a field,
the only maximal ideal of Z/nZ is (0).
If p is a proper prime divisor of n, then
(p) is a maximal ideal of Z/nZ.
In the ring R[X], the ideal (X) is maximal: if the
ideal J strictly contains (X), then it contains a polynomial
f with a nonzero constant term a. But then it follows
that the ideal J contains a itself and so also the element 1.
We conclude that J = R.
The same ideal is maximal in Q[X]/(X4 - 1), and not
in C[X]/(X4 - 1).
In the latter case, (X - i) and (X + i) are two maximal ideals containing
(X2 + 1).
The ideal (2) is not prime:
(1 - i)(1 + i) = 2.