I saw this claim: Let $W\subset V$ be a codimension-$1$ irreducible subvariety of an $n$-dimensional normal, irreducible, affine variety $V$. Then $\mathcal{O}_{V,W}$ — the coordinate ring at $W$— is a discrete valuation ring.
But why is $\mathcal{O}_{V,W}$ a coordinate ring? A coordinate ring should be in the form of $k[x_1,...,x_n]/M$, but I can't see why is $\mathcal{O}_{V,W}$ in that form? Also I feel confused with the definition of $\mathcal{O}_{V,W}$.
I suspect the confusion is a matter of terminology. If $W$ is a subvariety of $V$, then the coordinate ring of $V$ at $W$ isn't actually the coordinate ring of any variety, but instead it's defined to be the localization of the coordinate ring of $V$ at the prime ideal corresponding to $W$. I.e., if let $A$ be the coordinate ring of $V$, and $\mathfrak{p}$ be the prime ideal of $A$ corresponding to the irreducible subvariety $W$, then $\mathcal{O}_{V,W}:=A_{\mathfrak{p}}$.
This is usually called the local ring of $V$ at $W$ though, so this terminology does strike me as a bit odd.