Hartshorne II prop 6.6

Your questions can all be answered by reducing to the case where $X = \operatorname{Spec} R$ is affine.

We have $Y = \operatorname{Spec} R[t]$, with the projection map $\pi$ induced by the inclusion $R\to R[t]$. First of all, notice that if $K$ is the fraction field of $R$, then $K(t)$ is the fraction field of $R[t]$. And in general, localizations of $R$ inject into corresponding localizations of $R[t]$.

What are the codimension $1$ points of $Y$, i.e. the height $1$ primes of $R[t]$? Well, if $P \subset R[t]$ is a height $1$ prime, then either $P\cap R = Q$ is a height $1$ prime of $R$, or $P\cap R = (0)$.

And what are the corresponding localizations in each case? In the first case, $R_Q \subset R[t]_P = (R_Q)[t]$. In the second, $K=R_{(0)} \subset R[t]_P = K[t]_{P'}$, where $P'$ is the (maximal) ideal of $K[t]$ generated by $P$.

In other words, we have, in the first case, points that just correspond to the codimension-1 points of $X$ (and are in fact the generic points of the fibers over these points), and, in the second case, basically the closed points of $\mathbb{A}^1_{K(X)}$ (though since $K(X)$ is not algebraically closed, be a little careful of thinking this way, as Hartshorne is always working over algebraically closed fields).