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$?