Let $(M,d)$ be a compact space and $f:M\mapsto M$ an isometry. To prove that $f$ is surjective we take an arbitrary $a\in M$ and consider $f^n:M\mapsto M$ the function obtained by composing $f$ $n$ times with itself.
Since $M$ is compact $(f^n(a))_{n\in\Bbb N}$ has a subsequence $(f^{n_k}(a))_{k\in\Bbb N}$ that converges in $(M,d)$. Let's call its limit $a^*\in M$
We get $d(a,f^{n_{k+1}-n_k}(a))=d(f^{n_k}(a),f^{n_{k+1}}(a))\xrightarrow[k\rightarrow\infty]{}d(a^*,a^*)=0$
Why does that prove that $a\in f(M)$? (and since $a$ is arbitrary $M\subset f(M)\implies M=f(M))$
The argument shows $$\lim_{k\to\infty}d(a,f^{n_{k+1}-n_k}(a))=0,$$ i.e. $\lim\limits_{k\to\infty} f^{n_{k+1}-n_k}(a) =a$. Note that since $n_{k+1}-n_k\ge 1$, $$ f^{n_{k+1}-n_k}(a)\in f(M) $$ and $f(M)$ is closed (as a continuous image of the compact set $M$). This shows $$ a\in f(M) $$ as desired.