TITLE: Example II.6.5.2 in Hartshorne (Part I)
QUESTION [9 upvotes]: Let $k$ be a field and let $A=k[x,y,z]/(xy-z^2)$. Let $X=\operatorname{Spec}A$. What exactly do we mean by a ruling of the cone $Y:y=z=0$? Why is $Y$ a prime divisor of $X$?
Edit: What do we mean when we say that $Y$ can be cut-out set-theoretically by the function $y$? Why is the divisor of $y$ equal to $2Y$?
I am trying to understand example 6.5.2, p. 133 from Hartshorne and I am interested in seeing the details that Hartshorne omits. Could somebody please explain this example?
Edit: By definition, $\operatorname{div}(y)=\sum_{B} v_B(y)B$, where the summation is over all prime divisors $B$ of $X$. How do we go from this definition to $\operatorname{div}(y)=2Y$?

REPLY [8 votes]: As I said in the comment, the closed subset $Z(y)$ of zeros of $y$ is equal to $Y$ because $y=0$ implies that $z=0$. If you prefer, $\sqrt{yA}=(y,z)$. 
So the support of $\mathrm{div}(y)$ is $Y$. To compute the multiplicity of this divisor, we consider the generic point $\eta$ of $Y$ and have to compute the valuation $v_{\eta}(y)$, where $v_{\eta}$ is the valuation on $K(X)$ (field of rational functions on $X$) defined by the discrete valuation ring $O_{X, \eta}$. 
Let $\mathfrak p=(y, z)$ be the prime ideal of $A$ defining the point $\eta$. Then $\mathfrak p A_{\mathfrak p}$ is generated by $z$ because $y=z^2x^{-1}$. Therefore $v_{\eta}(y)=2v_{\eta}(z)=2$. So $\mathrm{div}(y)=2Y$.