For $X$ contractible, deformation retract of $CX$ onto $X$.
Let $H : X \times I \to X$ be a deformation retraction of $X$ onto a point $* \in X$, so $H(x,0) = x$ and $H(x,1) = *$ for all $x$. Then an explicit deformation retraction of $CX = (X \times I) / (X \times \{1\})$ onto $X = X \times \{0\}$ is given by $$G([x,s],t) = \begin{cases} [H(x,2st), s] &\text{ for $0\leq t\leq 1/2$} \\ [H(x,s), s(2-2t)] &\text{ for $1/2\leq t\leq 1$} \end{cases}$$
First, this is well-defined (and hence continuous): when $s=1$, the right-hand side does not depend on $x$, and for $t=1/2$, the two definitions agree. The fact that $G$ is a deformation retraction onto $X\times\{0\}$ then follows from the following computations: $$G([x,s],0)=[H(x,0),s]=[x,s]$$ $$G([x,s],1)=[H(x,s),0]\in X\times\{0\}$$ $$G([x,0],t)=[H(x,0),0]=[x,0]\text{ for $0\leq t\leq 1/2$}$$ $$G([x,0],t)=[H(x,0),0]=[x,0]\text{ for $1/2\leq t\leq 1$}$$
The intuition behind this is as follows. First, homotope the $X$-coordinate from $x=H(x,0)$ to $H(x,s)$, keeping the cone coordinate constant. Second, move the cone coordinate down to $0$ while keeping the $X$-coordinate constant. Note that if you try to do these steps at the same time instead of one after the other (as Najib Idrissi and Nitrogen did in their now-deleted answers), the map fails to be well-defined at the cone point, because the first step is only well-defined at the cone point if you keep the height constant (so the cone point stays at the cone point).
Another approach:
- Any cone $CY$ on a space $Y$ is contractible as it deformation retracts to the apex.
- If $X$ is contractible, then the inclusion $i:X\hookrightarrow CX$ of $X$ as the base of $CX$ is a homotopy equivalence. This follows for example since contractible spaces are terminal objects in the category $h\mathbf{Top}$ and a morphism between terminal objects is necessarily an isomorphism.
- Now, this inclusion $i$ is also a cofibration, and there is a lemma saying that a cofibration which is at the same time a homotopy equivalence (an acyclic cofibration) is the inclusion of a deformation retract.