Why is the localization at a prime ideal a local ring?

The localization $A_\mathfrak{p}$ is given by all fractions $\frac{a}{b}$ with $a\in R$ and $b\in R\setminus\mathfrak{p}$. So $\mathfrak{p}A_\mathfrak{p}$ consists of all fractions $\frac{a}{b}$ with $a\in\mathfrak{p}$ and $b\in R\setminus\mathfrak{p}$.

To show that $\mathfrak{p}A_\mathfrak{p}$ is the unique maximal ideal in $A_\mathfrak{p}$, let $I$ be an ideal in $A_\mathfrak{p}$ with $I\not\subseteq\mathfrak{p}A_\mathfrak{p}$. Then there is an element $\frac{a}{b}\in I$ with $a,b\in R\setminus\mathfrak{p}$. So $\frac{b}{a}$ is an element of $A_\mathfrak{p}$, and from $\frac{a}{b}\cdot\frac{b}{a} = 1$ we get that $I$ contains the invertible element $\frac{a}{b}$. Therefore, $I = A_\mathfrak{p}$.


Basically what you need to know is how the units in $A_\mathfrak{p}$ look like. More precisely, an element in the localization, say $\dfrac{a}{b} \in A_\mathfrak{p}$ is a unit if and only if $a \in A \setminus \mathfrak{p}$. Then what this tells you is that the set of non-units of $A_\mathfrak{p}$ is $\mathfrak{p}A_\mathfrak{p}$.

Therefore now if you want to see why this shows that $\mathfrak{p}A_\mathfrak{p}$ is a maximal ideal, suppose that $I$ is an ideal in $A_\mathfrak{p}$ with $\mathfrak{p}A_\mathfrak{p} \subsetneq I$. Then $I$ must contain a unit, and therefore $I = A_\mathfrak{p}$, so $\mathfrak{p}A_\mathfrak{p}$ is indeed a maximal ideal.

Finally, you need to make sure that you understand why the characterization of $\mathfrak{p}A_\mathfrak{p}$ as the set of non-units in $A_\mathfrak{p}$ implies that it is the unique maximal ideal in $A_\mathfrak{p}$. Well, any proper ideal $\mathfrak{m} \subsetneq A_\mathfrak{p}$ would have to be contained in the set of non-units (since otherwise it would contain a unit and that would imply that the ideal is the whole ring), i.e. $\mathfrak{m} \subseteq \mathfrak{p}A_\mathfrak{p}$, so if $\mathfrak{m}$ is maximal, this implies that $\mathfrak{m} = \mathfrak{p}A_\mathfrak{p}$.

Thus $\mathfrak{p}A_\mathfrak{p}$ is the unique maximal ideal, and hence $A_\mathfrak{p}$ is a local ring.