In Rick Miranda's "The basic theory of elliptic surfaces" the Example (I.5.1) see page 7 on a pencil of plane curves contains an argument Inot understand yet:
Let $C_1$ be a smooth cubic curve in $\mathbb{P^2}$ and let $C_2$ be any other cubic. By intersection theory and Bezout's theorem the intersection number $C_1 \cdot C_2$ is $9$. We form a pencil $P \subset \mathbb{P^2} $ generated by $C_1$ and $C_2$; in english that is a $\mathbb{P^1}$-family of curves (or more generally divisors) $[ \lambda C_1 + \mu C_2 ]$, which has $9$ base points $x_1,..., x_9$ . This gives only a rational map to $\mathbb{P^1}$. After blowing them up the fundamental locus of this rational map is resolved and we obtain a honest morphism $\pi: X \to \mathbb{P^1}$ where $X= Blowup(P)_{x_1,..., x_9}$ is the blowup of the pencil $P$ in these $ 9 $ points.
Then it is claimed that the canonical class of $X$ is $-C_1$ and that this implies that $K_X^2= (-C_1)^2 =0$.
How to verify that the canonical class of $X$ equals $-C_1$ and why does it have as consequence self-intersection number zero? The divisor $-C_1$ is definietely not vertical and therefore I not see why it's interesection with itself should vanish.
(I posted identical question a week ago in mse without getting any resonance. Hope that the question is not too elementary to be asked here.)