Isometries of $\mathbb{R}^n$
Let's assume WLOG that $f(0) = 0$. For every $r$, it follows that $f$ defines an isometry from the sphere of radius $r$ to the sphere of radius $r$.
Proposition: Any isometry $f : X \to X$ of a compact metric space is bijective.
Proof. $f$ is clearly injective. Suppose $f$ is not bijective. Then $f(X)$ is compact, so given $x \in X \setminus f(X)$ the distance $\text{dist}(x, f(X))$ is positive. Pick $\epsilon < \text{dist}(x, f(X))$. Let $N$ be the smallest positive integer for which $X$ admits a cover by $N$ open sets of diameter less than $\epsilon$. No such set containing $x$ can intersect $f(X)$, but by pulling back along $f$ it follows that we can find a cover of $X$ by $N-1$ open sets of diameter less than $\epsilon$; contradiction.
(In fact any isometry of a compact metric space is a homeomorphism, since a continuous bijection from a compact space to a Hausdorff space is necessarily closed.)
Apparently there are counterexamples to the above when $X$ is not compact, but I don't know any nice ones off the top of my head.
First assume $f$ fixes the origin. Show that $f$ preserves the inner product. Then you can show that $f$ is linear. Since you can translate a general isometry $f$ to obtain a new isometry that fixes the origin, $f$ must be surjective, and in fact given by $Ax+b$, where $A$ is an orthogonal matrix and $b$ is a vector.
Jonathan,
Yeah I thought that too at first, but you can show an isometry of $\mathbb{R}^n$ fixing the origin is linear without assuming that it's surjective. The key is the inner product, which, of course, you don't have in a general normed vector space. Preserving the inner product and fixing the origin implies that the map is linear (a great exercise). Then since it's injective and we're in finite and equal dimensions, it's also surjective. I found this thread because I had the exact same question as you. There are geometric proofs of surjectivity in $\mathbb{R}^2$ involving triangles or circles as well.