Look at the following theorem (due to Castelnuovo) taken from Beauville's book on complex surfaces:
I have a question about the behavior of $f$ on the exceptional curves generated by $\eta$.
Suppose that $E$ is an exceptional curve coming from a blow up of $\eta$ at a point $p\in S$, then what is $f(E)$? I think that $f(E)$ can't be a point, otherwise I could define $\phi(p):=f(E)$. This is a contradiction with the definition of rational map. Hence I conclude that $f(E)$ is a curve on $X$. Is my reasoning correct?
Edit: Maybe the above reasoning is wrong, but at least I'd like to know which are the exceptional curves (coming from blow-ups) that are not contracted by $f$ (if there is any). I'm sure that I've read somewhere the following thing:
The exceptional curve of the last blow-up can't be contracted by $f$.
Can you explain this sentence?
There is a little bit of ambiguity in your question: are you asking this for any $\eta$ that satisfies the conclusion of the theorem, or specifically for the one that is constructed in the proof?
The first interpretation is silly: for any $S \dashrightarrow X$, given one $(S',\eta,f)$ satisfying the conclusion, we could just do another 'unnecessary' blow-up. Then clearly the exceptional divisor of the last blow-up maps to a single point.
So let's assume that we chose a 'minimal' such $S'$ (whatever that means). Then your question is answered by Remark II.13 (2):
Since his explanation is a bit minimalistic, I will expand a little bit on this. In fact it's easier to prove the statement in the bigger generality that $S$ is not necessarily projective (but we do need smoothness!). Write $f(E) = q \in X$.
Remark. Note that such a factorisation, if it exists, is unique (for example, use Hartshorne Exercise II.4.2, but that's overkill).
Reduction 1. Reduce to the case where $X$ is affine.
Let $V = S\setminus\{p\}$; thus, we automatically get a map on $V$. Take an affine open neighbourhood $W$ of $q$, and let $U$ be an open neighbourhood of $p \in S$ such that $U\setminus \{p\}$ maps into $W$. If we can construct a map $U \to W$ factoring $f$, then the maps on $U$ and $V$ automatically agree on $U \cap V$ (by the uniqueness remark above), so they glue to $S$.
(The above step is why I dropped the projectivity assumption.)
Reduction 2. Reduce to $X = \mathbb A^n$.
Any affine $X$ is a closed subvariety of $\mathbb A^n$. Moreover, if the image of $S\setminus\{p\}$ lands in $X$, then so does $p$, by (Zariski) continuity.
Reduction 3. Reduce to $X = \mathbb A^1$.
Giving a morphism $Y \to \mathbb A^n$ is the same thing as giving $n$ morphisms $Y \to \mathbb A^1$ (by the universal property of the product).
And finally:
Proof for $X = \mathbb A^1$. As above, let $V = S \setminus \{p\}$. For any affine open $U \subseteq S$, the restriction map $$\mathcal O_S(U) \to \mathcal O_S(U \cap V)$$ is an isomorphism, by "Hartog's theorem" [Stacks project, Tag 031T, (2)] (this is where we use smoothness). Hence it is true for all opens, so taking global sections gives $$\Gamma(S, \mathcal O_S) = \Gamma(V, \mathcal O_V).$$ The result now follows for $\mathbb A^1$ since elements of $\Gamma(Y,\mathcal O_Y)$ correspond to maps $Y \to \mathbb A^1$: the map $V \to \mathbb A^1$ that we assume given extends (uniquely) to a map $S \to \mathbb A^1$.
It's probably a good exercise to think about what the image of the exceptional divisor is in each of the examples that Beauville gives in II.14.
Another interesting exercise: it's not so clear where we used the assumption that $f(E)$ is a point! Try to spot which step goes wrong if the image is a curve.