Localization in a ring which is not an integral domain In an integral domain $A$, localization by a prime ideal $\mathfrak p$ (obtaining the local ring $A_\mathfrak p$) can intuitively be thought of as simply formally inverting all the elements of $A\setminus \mathfrak p.$ This heuristic is very helpful when one is understanding what $A_\mathfrak p$ looks like.
If $A$ is not an integral domain, then this doesn't work, since $A\setminus \mathfrak p$ might contain zero-divisors. However, in this case the zero divisors in $A\setminus\mathfrak p$ are sent to zero in $A_\mathfrak p.$ This is because, if $x\in A$ is a zero divisor, say $xy=0,$ then we have $y(x\cdot 1-0\cdot 1)=xy=0,$ so $(x,1)=(0,1)=0\in A_\mathfrak p.$
My question is: are the the only things that localization does? Specifically, does localization simply kill the zero-divisors in $A\setminus \mathfrak p$ and then formally invert the rest of the elements? More precisely, if $D$ is the ideal of $A$ generated by the zero divisors of $A\setminus \mathfrak p$ and $\bar{\mathfrak p}$ is the ideal generated by the image of $\mathfrak p$ in $A/D,$ is it true that $A_\mathfrak p\cong (A/D)_{\bar{\mathfrak p}}?$
NOTE: I realize that the final sentence of the final paragraph is sort of ill-formed. At the very least, I don't like it. This could be because my question doesn't make sense or it could be for some other reason. If anyone has a suggestion to make it read better or make more sense please let me know. All I really care about is finding some heuristic for understanding what a ring $A_\mathfrak p$ looks like if $A$ is not an integral domain.
 A: Your proof for "$x=0$ in $A_\mathfrak{p}$" only works if $y\notin \mathfrak{p}$. 
So localizing kills people who are zero divisors by someone outside of $\mathfrak{p}$. So the picture is a bit more complicated. In particular if $x\notin \mathfrak{p}$, then $x$ is not killed by anyone outside of $\mathfrak{p}$ (it is prime, after all). In particular, the map $A\to A_\mathfrak{p}$ doesn't kill anyone not in $\mathfrak{p}$ (which is to be expected : they all become invertible so if you kill any of them, you kill $1$, so $1\in \mathfrak{p}$, which is absurd), it only kills some people in $\mathfrak{p}$.
But of course you might as well kill them first and then invert the multiplicative set that is $\pi(A\setminus \mathfrak{p})$ (where $\pi$ is the projection onto $A/I$ and $I$ is the subideal of $\mathfrak{p}$ generated by those elements killed by someone outside $\mathfrak p$). 
Of course, $I\subset \mathfrak{p}$ so $\pi(\mathfrak p)$ is still prime and $\pi(A\setminus \mathfrak{p})= \pi(A)\setminus \pi(\mathfrak p)$, so the resulting formula is $(A/I)_{\mathfrak p/I}$; but I don't know if it helps in visualization or in computations. 
Note that in $A/I$, if $\pi(x)\in \mathfrak{p}/I$ and $\pi(y)\notin \mathfrak{p}/I$ satisfy $\pi(xy)=0$, then $xy\in I\subset \mathfrak{p}$ so first of all $x\in \mathfrak{p}$, second of all $y\notin \mathfrak{p}$, so that $x\in I$ so $\pi(x)=0$. Therefore $A/I\to (A/I)_{\mathfrak{p}/I}$ doesn't kill anything, if that's what you wanted. 
