Define an ideal of a unital commutative $C^*$-algebra $A$ to be a proper subspace $I$ of $A$ such that $xy,yx\in I$ for all $x\in I$ and $y\in A$. Show that if $\lambda\in \widehat{A}$ (the space of all characters, a character is a unital $C^*$-algebra homomorphism from $A$ to $\mathbb{C}$), then the kernel $\lambda^{-1}(0)$ is a maximal ideal of $A$; conversely, if $I$ is a maximal ideal in $A$, show that $I$ is closed, and there is exactly one $\lambda\in \widehat{A}$ such that $I=\lambda^{-1}(A)$.
Let $\lambda\in\widehat{A}$ be a character, $\lambda^{-1}(0)$ is a proper subspace can be checked directly (note that $\lambda(1)=1)$), and it is also closed under the multiplication of $A$, thus an ideal of $A$. To show it is a maximal, it suffices to show that the ideal generated by $\lambda^{-1}(0)$ and $x\notin \lambda^{-1}(0)$ is $A$. Since an ideal is closed under scalar multiplicatoin, we may assume that $\lambda(x)=1$. Let $y\in A$, if we then take $c=\lambda(y)$, then $\lambda(y-cx)=0$, thus $y-cx\in\lambda^{-1}(0)$, thus $y$ is in the ideal generated by $x$ and $\lambda^{-1}(0)$.
Now assume that $I$ is a maximal ideal, it is easy to show that the closure $\overline{I}$ of $I$ is also an ideal. Since $I$ does not intersect $A^\times$ (the space of all invertible elements of $A$) and $A^\times$ is open, $\overline{I}$ still does not intersect $A^\times$, but $I$ is maximal, thus $I=\overline{I}$, which implies that $I$ is closed. I am stuck here, I don't know how to construct a character $\lambda$ such that $I=\lambda^{-1}(0)$?