Ring of regular functions on a point Let $X \subset \mathbb{A}^n$ be an affine variety. Then the ring $\mathcal{O}_X$ of regular functions on $X$ is $A(X) := k[y_1,\dots,y_n] / I_X$, where $I_X$ is the vanishing ideal of $X$ (and $k$ is algebraically closed). Now let us apply this definition to $X=\left\{p\right\}$, the affine variety of a single point. Since the vanishing ideal $m_p$ of $p$ is maximal, we get that $\mathcal{O}_p = k$. But this contradicts direct application of the definition "regular", according to which $\mathcal{O}_p$ is the set of quotients $g/h$ of polynomials such that $h(p) \neq 0$, i.e. $(k[y_1,\dots,y_n])_{m_p}$. What am i missing here?
Edit I: My confusion comes from applying the definition of a regular function $f$ on the point $p$ of the variety $\left\{p\right\}$. By definition there must exist a neighborhood of $p$ such that $f$ can be written as the quotient $f=g/h$, where $h$ does not vanish anywhere on this neighborhood. The only possible neighborhood is $p$ and so this gives that any regular function must be of the form $f=g/h, h(p) \neq 0$. 
Edit II: In summary, applying the definition of regular function on the variety $X=\left\{p\right\}$ yields $\mathcal{O}_X = (k[y_1,\dots,y_n])_{m_p}$, while applying the characterization $\mathcal{O}_X = k[y_1,\dots,y_n]/I_X$ yields $\mathcal{O}_X=k$. Certainly $(k[y_1,\dots,y_n])_{m_p} \neq k$. The point that i was missing (thanks to Hoot and Zev) is that these two rings coincide if we view them as functions on $p$. And to do that we simply have to take the quotient of $(k[y_1,\dots,y_n])_{m_p}$ by $m_p$.
 A: You're mixing up two very different things.
The coordinate ring of a variety $X$ with vanishing ideal $I$ is
$$k[y_1,\ldots,y_n]/I$$
which represents the regular functions on the variety $X$. If $X$ is a point $\{p\}$, the ring of regular functions on the set $\{p\}$ to the field $k$ is equal to the ring of polynomials $k[y_1,\ldots,y_n]$, modulo the equivalence relation of "defining the same function on $\{p\}$", which produces $k[y_1,\ldots,y_n]/I$.
(Also, just intuitively,  the collection of functions $\{p\}\to k$ is clearly going to be isomorphic to $k$.)
The local ring of an (irreducible) variety $X$ with vanishing ideal $I$ is
$$k[y_1,\ldots,y_n]_{I}$$
which represents the rational functions on $k^n$ that don't blow up on $X$. If $X$ is a point $\{p\}$, the ideal of regular functions on $k^n$ that vanish on $\{p\}$ is $I$, so the ring of rational functions on $k^n$ that don't blow up on $I$ is the collection of $\frac{f}{g}$ where $f\in k[y_1,\ldots,y_n]$ and $g\in k[y_1,\ldots,y_n]\setminus I$, which produces
$k[y_1,\ldots,y_n]_{I}$.
So there's no contradiction. 
