Let $X$ be a hypersurface in $\mathbb P^{n}$ defined by the vanishing set of a homogeneous degree $k$ polynomial.
Why is the sequence
$0 \rightarrow \mathcal O(-k) \rightarrow \mathcal O_{\mathbb P^{n}} \rightarrow i_{*} \mathcal O_{X} \rightarrow 0$
(where $i_{*}$ is the inclusion of $X$ into $\mathbb P^{n}$)
exact?
I have seen this or a very similar statement (slightly more/less general) referenced in several sources including Hartshorne and it is always stated as fact.