It is well known that every proper ideal is contained in a maximal ideal. If $a$ is a noninvertible element, then the generated ideal $(a)$ is not the whole ring. If it were, then $1\in (a)$, implying $ab=1$ for some $b$, a contradiction. As a proper ideal, $(a)$, and hence $a$, must then be contained in a maximal ideal.
Having read this (which is now technically correct), it makes sense to fill in some missing details, which could help other readers.
To be completely correct, one needs:
- Assume $I \neq R$
- Define $P=\{I \subset A : A \text{ is a proper ideal in } R\}$
Assumption 1 is necessary because the result is not true if $I=R$. A maximal ideal is by definition a proper subset of the ring.
For $P$ in assumption 2 above to exist, $P$ must contain at least one element. This follows #1 because $I$ is contained $P$.
To prove that $P$ contains a maximal ideal (which would clearly contain $I$) requires invoking the Zorn's lemma. Since set inclusion is a partial ordering on any collection of sets, we use the set inclusion predicate as the partial ordering on $P$.
To apply Zorn's lemma we take an arbitrary chain $C$ in $P$ and show it has an upper bound in $P$. Define $U_C = \cup C$ (which exists by the axiom of union of set theory). You can show that $U_C$ is an ideal and that it contains $I$. This takes a little bit of work, but it is routine. To show that $U_C$ is in $P$, one notices that $1 \neq U_C$ because none of the elements in $C$ contain $1$ (else they would not be proper ideals in $R$ and would not belong to $P$). Finally, it obvious that $U_C$ is an upper bound for the chain $C$.
Since we have shown that every chain $C$ in $P$ has an upper bound in $P$, Zorn's lemma states that $P$ has a maximal element. The maximal element in in $P$. Hence, by the definition of $P$, it contains $I$.
One more note, the ring $R$ must have unity. The unity requirement is essential to show that $U_C$ is an ideal not equal to $R$. Without assuming $1 \in R$, one CANNOT show that $U_C$ is a proper ideal in $P$.
Best Answer
Suppose that $R$ has more than one maximal ideal, say $M_1$ and $M_2$. Then $M_1\cap M_2$ is a proper ideal and it can not be maximal (since it is contained in both $M_1$ and $M_2$) therefore we must have $M_1\cap M_2 = 0$. Now by the chinese rimainder theorem we have $$R \cong \frac{R}{0} = \frac{R}{M_1\cap M_2} \cong \frac{R}{M_1}\times\frac{R}{M_2}$$ the right hand side is a product of two fields so it has exactly two maximal ideal. Thus $R$ can not have more than two maximal ideals.