$f:S^n\to X$ is nulhomotopic if and only if there is an extension $\tilde{f}:D^{n+1}\to X$ of $f$. 
$f:S^n\to X$ is nulhomotopic if and only if there is an extension $\tilde{f}:D^{n+1}\to X$ of $f$. ($X$ is a topological space)

I know how to prove the forward direction, but I don't know how to prove the reverse direction directly. Could you give any hint? (I'm a beginner of Algebraic topology so I don't know the higher concept of Algebraic topology. I just wanted to extend some theorem in Munkres' topology textbook.)
 A: If the map $f$ factor through $D^n$ then it is nullhomotopic as $D^n$ is contractible, hence every map out of $D^n$ is null homotopic. For the other direction you have a homotopy $h:S^{n} \times I \rightarrow X$ where $h(s,1) = *$. Therefore we get a factorization throught the qoutient $(S^n \times I)/(S^n \times {1} )$ which is the cone of $S^n$ hence the disc.
A: Let $\widetilde{f}\colon D^{n+1}\to X$ be an extension of $f\colon S^n\to X$.
If you already know that $D^{n+1}$ is contractible, you're essentially done since that implies that there is a homotopy $$F\colon D^{n+1}\times[0,1]\to X$$ such that $$F(\cdot,0) =\widetilde{f},\ F(\cdot,1) = \operatorname{const}$$ which means precisely that $\widetilde{f}$ is nullhomotopic. Since $\widetilde{f}|_{S^n} \equiv f$, i.e. $\widetilde{f}$ agrees with $f$ on $S^n \subset D^{n+1}$, $f$ is nullhomotopic.
If you do not want to presume that $D^{n+1}$ is contractible, you can pick an arbitrary point $y \in \operatorname{int}(D^{n+1})$ (the interior) and homotope $\widetilde{f}$ via a homotopy $F$ so that it becomes constant on a neighbourhood $V_y$ of $y$.
Now pick a smaller copy $U$ of the disk that sits inside $V_y$ and remove its interior $\operatorname{int}(U)$. Since the homotopy $F$ has been arranged to be constant on $V_y$, it's certainly constant on the remaining boundary $\partial U$ of the removed disk $U$.
Now observe that $D^{n+1}$ with the removed open disk $U$ becomes a cylinder. So this new cylinder gives a homotopy between $f\colon S^n \to X$ and the constant map $\operatorname{const}$ via $$F\colon S^n\times[0,1] \to X$$ with $$F(\cdot,0) = f,\ F(\cdot,1) = \operatorname{const.}$$
