In characteristic zero, this is a consequence of Hurwitz's theorem $$2g_ {P^1}-2=n(2g_ X-2)+deg( Ram(f))$$ which in your case yields $$-2=n (2g_ X-2)+ \text {nonnegative number }$$
This equality forces $g_X$ =0 (else the right-hand side is nonnegative) and since the only smooth projective curve of genus zero is (up to isomorphism) $\mathbb P^1$, your first question is answered.
As to your second question, just take $X=\mathbb P^1$ and $f([z:w])=[z^2:w^2]$