It is due to Arzela Ascoli (in a sense).

We assume that the claim is false. Then there is a compact subset $K$ and (check this!) Some $\epsilon>0$ and some sub sequence $(f_{n_k})_k$ so that for each $k$, there is some $x_k \in K$ with $$|f_{n_k}(x_k)-f(x_k)| >\epsilon \qquad (\dagger).$$

But Arzela Ascoli yields a further sub sequence $(f_{n_{k_l}})_l$ which converges uniformly in $K$ to some function $g$. But we assume that the sequence $(f_n)_n$ converges pointwise to $f$, hence $f=g$.

One can now easily derive a contradiction to $(\dagger)$.

The principle used here is sometimes called the sub sequence principle, which states that $x_n \to x$ is equivalent to the fact that every sub sequence $(x_{n_k})_k$ has a further sub sequence which converges to $x$, as long as the notion of convergence is given by a topology.