In Beauville's Complex Algebraic Surface, exercise V.21(5), we must find a surface with infinitely many exceptional curves.
He gives the following hint (I'm paraphrasing):
let $P$ be a pencil of cubic in $\Bbb{P}^2$ such that every cubic in $P$ is irreducible and let $S$ be the blowup of the basepoints of $P$. Show that every divisor $D$ with $D^2=D\cdot K_X=-1$ is equivalent to an exceptional curve (*). Let $L\subset S$ be the strict transform of a general line in $\Bbb{P}^2$ and $E_i$ the exceptional divisors. Consider the following: \begin{align*} \delta&:=L-E_1-E_2-E_3\\\\ \phi:\text{Pic}(S)&\to\text{Pic}(S)\\ D &\mapsto D+(\delta\cdot D)\delta \end{align*}
I've checked that $\delta^2=-2$, $K_S\cdot\delta=0$, $\phi(D)^2=D^2$ and $K_S\cdot\phi(D)=K_S\cdot D$. That also allows us to check that $\phi\circ\phi=\text{id}$ and that $\phi$ is an automorphism.
Assuming the claim (*), we can also show that for every exceptional curve $C$ we can get a new exceptional curve by applying $\phi$.
Now I'm stuck because 1) I don't know how to prove (*) and 2) I don't know how the information I have about $\phi$ will show that there are infinitely many exceptional curves.
For (1), according to Tabes' comment, the only issue is to show smoothness. Actually, there is a adjunction formula for effective divisors: $$2p_a(D)-2=D\cdot(D+K_S),$$ where $p_a(D)$ is the arithmetic genus of an effective divisor $D$ (see Hartshorne, Chp. V, Ex. 1.3). Now the assumptions implies that $p_a(D)=0$. Now, if $D$ is irreducible, it must be a smooth rational curve. The irreducibility should be guaranteed by choosing 9 blowup points to be general (Also see the reference given in this MO answer).
For (2), you can iterate the $\phi$ with respect to different exceptional divisors. For instance, for each $\delta_{ijk}=L-E_i-E_j-E_k$ with $i<j<k$, the map
$$\phi_{ijk}:D\mapsto D+(D\cdot \delta_{ijk})\delta_{ijk}$$
defines an automorphism on $\text{Pic}(S)$. Of course, it is an involution, so in order to generate an infinite sequence of $(-1)$-curves, one should consider compositions of $\phi_{ijk}$'s with varying indexes.
Apply $\phi_{ijk}$ to a divisor $C=aL-\sum_nb_nE_n$, we have $$\phi_{ijk}(C)=a'L-\sum_nb_n'E_n,~ \text{with}~a'=2a-b_i-b_j-b_k. $$
If $C$ is a $(-1)$-curve, then the condition $C\cdot K_S=-1$ implies that $3a-\sum_nb_n=1.$ So if $b_i,b_j,b_k$ are the minimal three integers among $\{b_1,...,b_9\}$, $$a-b_i-b_j-b_k\ge a-\frac13\sum_nb_n>0,$$ therefore $a'>a$. Namely, for each $(-1)$-class, we can always apply suitable $\phi_{ijk}$ such that the leading coefficient is strictly incresing. So by iterating this process, we can find a infinite sequence of $(-1)$-curves.