Consider for the sake of concreteness $X=Spec\ \mathbb{C}[x,y]$, and let $\mathfrak{p}=\langle x\rangle$. Translating this to geometry this is the $y$-axis, in the sense that the $y$-axis is the zero set of $\mathfrak{p}$.
An example of a Zariski neighbourhood of $\mathfrak{p}$ is $$D(y)=\{\mathfrak{q}\mid y\not\in \mathfrak{q}\}$$ translating this into geometry this is the complement of the $x$-axis.
So the geometric picture reads
an open neighbourhood of the $y$-axis is the complement of the $x$-axis
Now I know I shouldn't rely too much on my intuition about the usual Euclidean topology, but this still seems strange to me. This is strange, because the $y$-axis contains the origin, or phrased algebraically $\langle x,y\rangle\in V(\mathfrak{p})$, but the $x$-axis also contains the origin.
So we have an open neighbourhood of the $y$-axis, but it does not contain all points on the $y$-axis. How should I think about this?
It seems like the geometric picture is that an open neighbourhood of a prime ideal (or curve) is a Zariski open subset of $\mathbb{C}[x,y]$ containing a Zariski open subset of the curve
Is that correct? And if so, is the following interpretation also correct:
The local ring $\mathcal{O}_\mathfrak{p}$ of germs of function near the curve $\mathfrak{p}$ are all rational functions that have poles at at most a Zariski closed subset of $\mathfrak{p}$
As you can tell I am very unsure about my intuition about schemes (even the simplest affine ones), so some feedback on this line of reasoning would be appreciated.