There is a very standard fact that I am having a hard time understanding. The claim is that if we have an affine variety $Y$ then the localization of the coordinate ring by the maximal ideal $m_p=\{f\in A(Y)|f(p)=0\}$ is isomorphic to $\mathcal{O}_p$, the ring of local regular functions at $p$.
Here's my mix up: So loosely speaking, elements of $\mathcal{O}_p$ consists of functions $f$ such that in a neighborhood of $p$, we can write $f=\frac{g}{h}$ such that $g,h\in k[x_1,...,x_n]$ and $h\ne 0$ on this neighborhood. Why don't we want to localize $A(Y)$ by elements that don't vanish on $p$? I don't see how the two things are isomorphic. I think I'm missing something very fundamental.