Consider R = Z[X] and f = X2 + 1
R.
Then (f) is a prime ideal, since it is irreducible in Q[X], and so R/(f) is a domain. Observe that R/(f) is isomorphic to the Gaussian integers, which where shown earlier to be a domain.
The ideal (f) is not maximal, as R/(f), the Gaussian integers, do not form a field.
The ideal ({f, 1 + X}) leads to the residue class ring Z + Zi/(1 + i), which is isomorphic to Z/(2), a field. Therefore, ({f, 1 + X}) is a maximal ideal.