I will present an answer which can be (in principle, at least) understood by anyone who knows single variable calculus and the definition of a continuous function $f: \mathbb{R}^n \rightarrow \mathbb{R}$. Then I will explain how to shorten the argument a little by using topological language.

Step 1: Let $f: [0,1] \rightarrow \mathbb{R}$ be a continuous function with $f(0) = f(1)$. Then there exist $x,y \in [0,1)$ such that $f(x) = f(y)$ and $x\neq y$.

Proof: We may assume $f$ is nonconstant. By the Extreme Value Theorem it assumes a minimum value $m$ and a maximum value $M$ with $m < M$. Let $x_m,x_M$ be such that
$f(x_m) = m$ and $f(x_M) = M$. Without loss of generality $x_m < x_M$. By the Intermediate Value Theorem, every value in $(m,M)$ is assumed on the interval $(x_m,x_M)$. Moreover, because $f(1) = f(0)$, the function

$g: [x_M,1+x_m]: \rightarrow \mathbb{R}$ given by

$x \mapsto f(x)$, $x_M \leq x \leq 1$,

$x \mapsto f(x-1)$, $1 \leq x \leq 1+x_m$

is continuous, with $g(x_M) = M$, $g(1+x_m) = m$, so by the Intermediate Value Theorem takes every value in $(m,M)$ on the interval $(x_M,1+x_m)$, so that $f$ takes every value in $(m,M)$ on $(x_M,1) \cup (0,x_m) = [0,1] \setminus [x_m,x_M]$. Thus $f$
takes every value in $(m,M)$ at least twice and is not injective on $[0,1)$.

Step 2: Let $n$ be an integer greater than one, and let $f: \mathbb{R}^n \rightarrow \mathbb{R}$ be a continuous function. Then $g: [0,1] \rightarrow \mathbb{R}$ given by
$g(t) = f(\cos(2\pi t),\sin(2\pi t),0,\ldots,0)$ is continuous with $g(0) = g(1)$, so by Step 1 there is $0 \leq t_0 < t_1 < 1$ such that $g(t_1) = g(t_2)$. That is,
$f(\cos(2\pi t_1),\sin(2\pi t_1),0,\ldots,0) = f(\cos(2\pi t_2),\sin(2\pi t_2),0,\ldots,0)$, so $f$ is not injective.

Step 3: A softer, more topological version of this is as follows: let $f: \mathbb{R}^n \rightarrow \mathbb{R}$ be continuous. Seeking a contradiction, we suppose it is injective. Let $S^{n-1} \subset \mathbb{R^n}$ be the unit sphere. Since it is compact, the restriction of $f$
to $S^{n-1}$ gives a homeomorphism onto its image, which is a compact, connected subset of $\mathbb{R}$ hence a closed bounded interval $[a,b]$. If $a = b$ then $f$ is constant, hence not injective. Otherwise, observe that if we remove any one of the uncountably infinitely many points from $S^{n-1}$ we get a space homeomorphic to $\mathbb{R}^{n-1}$, which is connected if $n \geq 2$. However, there are only two points in $[a,b]$ whose removal leads to a connected space: the two endpoints. Contradiction!