I am reading Hatcher's Proposition 1B.9 page 90. He is trying to prove that if $X$ is a connected CW complex, $Y$ is $K(G,1)$ then every homomorphism $\pi_1(X,x_0) \rightarrow \pi_1(Y,y_0)$ is induced by a map $(X,x_0) \rightarrow (Y,y_0)$. Specifically, I fail to see why in order to extend $f$ over a cell $e^2_\beta$ with attaching map $\omega_\beta: S^1 \rightarrow X^1$, we need $f\omega_\beta$ to be nullhomotopic.
K(G,1) space is unique up to homotopy equivalence
algebraic-topologycw-complexeseilenberg-maclane-spaces
Related Solutions
Indeed, Theorem 1B.9 is a good tool here. In particular, you'll want to use the uniqueness part of the theorem. That means that any two maps $(X,x_0)\to (K(G,1),y_0)$ which induce the same map on $\pi_1$ are homotopic. What does that tell you about a map $f:(X,x_0)\to (K(G,1),y_0)$ which induces the trivial homomorphism on $\pi_1$?
The answer is hidden below.
It tells you $f$ is homotopic to the constant map $(X,x_0)\to (K(G,1),y_0)$, since the constant map also induces the trivial homomorphism on $\pi_1$. So, if there are no nontrivial homomorphisms $\pi_1(X)\to G$, this applies to every map $f:X\to Y$ (for an appropriate choice of basepoints $x_0$ and $y_0$).
The CW-flavoured argument uses the relative version of CW approximation:
Let $X$ and $Y$ be CW complexes, $A\subset X$ a subcomplex. If $f\colon X \to Y$ is a continuous function that is cellular on $A$ then there is a homotopy $H\colon X\times I \to Y$ such that $H_0 = f$, $H_t(a) = f(a)$ for all $a\in A$ and $t\in I$, and $H_1$ is cellular.
Let $X$ be a CW complex, and $\iota \colon X^n \to X$ the inclusion of its $n$-skeleton (we omit the subscript on $\iota$ for the sake of notation). We want to show that $\iota_*\colon \pi_1(X^2) \to \pi_1(X)$ is an isomorphism. Suppose $S^1$ is given a CW structure so that the basepoint is a $0$-cell.
If $f\colon S^1 \to X$ is basepoint preserving, then by relative CW approximation there is a basepoint preserving homotopy between $f$ and a pointed cellular function $\tilde{f}\colon S^1 \to X$. By cellularity the image of $\tilde{f}$ is in $X^1$, so $\iota_*\colon \pi_1(X^2)\to \pi_1(X)$ is surjective.
Now suppose $f\colon S^1 \to X^2$ is a pointed map such that $[\iota\circ f] = 0 \in \pi_1(X)$, i.e. $[f]$ is in the kernel of $\iota_*$. Without loss of generality we can assume that $f$ is a cellular map. If we consider any basepoint-preserving null-homotopy $H\colon S^1 \times I \to X$ of $\iota\circ f$, then by relative CW approximation (note that $H$ is cellular on the subcomplex $(X\times \{0\}) \cup (\{x_0\} \times I) \subset X \times I$) $H$ is homotopic to a basepoint-preserving null-homotopy $\tilde{H}$ of $\iota\circ f$ which is cellular. In particular the image of this null-homotopy is in $X^2$ so in fact $[f] = 0 \in \pi_1(X^2)$, therefore $\iota_*$ is injective.
Note: an essentially identical argument shows that $\pi_n(X) \cong \pi_n(X^{n+1})$ for all $n\geq 0$, as an exercise you should write out the details.
Edit: Further note: after looking at Hatcher's proof of this proposition, it seems more elementary than the full force of CW approximation, even though I feel like CW approximation is the "conceptual" way to answer your specific question about CW complexes.
Best Answer
Let's say that we're given a map $g: S^1 \rightarrow X$ and we want to know when it extends to a map $D^2 \rightarrow X$. This happens precisely when $g$ is nullhomotopic.
If $g$ is nullhomotopic then there is a homotopy $H:S^1 \times I \rightarrow X$ so that $H(-,0) = g$ and $H(-,1)$ is a constant map. This means that $H$ descends to a map $H':(S^1 \times I)/(S^1 \times \{1 \}) \rightarrow X$ and since $(S^1 \times I)/(S^1 \times \{1 \}) \approx D^2$ we're done. The proof is easily reversible as well so we see that $g$ extends to a map $D^2 \rightarrow X$ iff $g$ is nullhomotopic.
Does this answer your question?