If $X$ is a topological space and if $A$ is a subspace of $X$, then a retraction $r:X\to A$ is a continuous function such that $r(a)=a$ for all $a\in A$. The following exercise furnishes practice with the notion of "retraction":
Exercise 1: Let $i:A\to X$ denote the inclusion map.
(a) Prove that if $X$ is a Hausdorff space and if $r:X\to A$ is a retraction, then $A$ is a closed subset of $X$.
(b) Prove that a continuous function $r:X\to A$ (where $A$ is a subspace of $X$) is a retraction if and only if $r\circ i$ is the identity map of $A$.
(c) Prove that there is a retraction $r:\mathbb{R}^n\setminus \{0\}\to S^{n-1}$ where $S^{n-1}$ is the $(n-1)$-sphere in $\mathbb{R}^n$. (Hint: define $r(x)=\frac{x}{\left\|x\right\|}$ for all $x\in \mathbb{R}^n\setminus \{0\}$ where $\left\|x\right\|$ denotes the Euclidean norm of $x$.)
Note that part (b) of Exercise 1 has an important consequence from the point of view of homology theory. Indeed, the functorial properties of the singular homology theory imply that $r_{*}\circ i_{*}:H_n(A)\to H_n(A)$ is the identity map on homology for all nonnegative integers $n$ (an analogous statement holds for reduced homology). In particular, $r_{*}:H_n(X)\to H_n(A)$ is an epimorphism (surjective) for all nonnegative integers $n$ and $i_{*}:H_n(A)\to H_n(X)$ is a monomorphism (injective) for all nonnegative integers $n$.
You should now be able to solve the following exercise:
Exercise 2:
(a) Prove that there is no retraction $r:B^{n}\to S^{n-1}$ for all positive integers $n$. (Hint: the closed $n$-ball $B^{n}$ is acyclic in reduced homology whereas the $(n-1)$-sphere is not.)
(b) Prove that if $f:S^{n-1}\to S^{n-1}$ is a continuous function and if $r:B^{n}\to S^{n-1}$ is an extension of $f$ to $B^{n}$, then $f$ induces the zero homomorphism in homology. (Hint: use the functorial properties of singular homology.)
(c) (Brouwer's fixed point theorem) Prove that every continuous function $f:B^{n}\to B^{n}$ has a fixed point for all positive integers $n$. (Hint: if $f:B^{n}\to B^{n}$ is a continuous function without a fixed point, then $g:S^{n-1}\to S^{n-1}$ defined by the rule $g(x)=\frac{f(x)-x}{\left\|f(x)-x\right\|}$ has an extension to a continuous function $r:B^{n}\to S^{n-1}$. In particular, $g$ induces the zero homomorphism in homology by part (b). Show, however, that $g$ is homotopic to the identity map of $S^{n-1}$ and thus induces the identity map in homology. Derive a contradiction by computing the singular homology of the $(n-1)$-sphere $S^{n-1}$.)
I hope this helps!