Solution to Abstract Algebra by Dummit & Foote 3rd edition Chapter 7.4 Exercise 7.4.4
($\Rightarrow$) Suppose $R$ is a field. Let $I \subseteq R$ be an ideal which properly contains 0; then there exists an element $a \neq 0$ in $I$. Since $R$ is a field, $a$ is a unit in $R$. By Proposition 9, $I = R$. Thus $R$ is the only ideal of $R$ which properly contains 0, and hence 0 is a maximal ideal in $R$.
($\Leftarrow$) Suppose 0 is a maximal ideal in $R$. Now $R$ is commutative by hypothesis. Let $a \in R$ be nonzero. Then since 0 is maximal, we have $(a) = R$. Since $1 \in R$, there exist elements $b,c \in R$ such that $ab = ca = 1$. By Exercise 7.1.28, $a$ has a two-sided inverse. Thus every nonzero element of $R$ is invertible, and hence $R$ is a field.