I am trying to show that given a group $G$ there always exist a CW complex $X$ such that $\pi_1 (X) \cong G.$ Here's what I have thought about this problem $:$
What I know is that if $X$ is any CW complex then it's fundamental group is isomorphic to the fundamental group of it's $2$-skeleton. Also I know that $1$-skeleton of a CW complex is nothing but a connected graph and every connected graph is homotopy equivalent to wedge of certain number of copies of circles (the number is determined by the number of edges of the graph which are not contained in a maximal tree). Also the fundamental group of wedge of circles is the free product of some copies of $\mathbb Z$ (as many as the number of circles in the wedge). Now we also know that every group is a quotient of some free group. Let $G = \left \langle a_{\alpha}, \alpha \in I\ \vert\ r_{\beta}, \beta \in J \right \rangle,$ where $a_{\alpha}$'s are the generators and $r_{\beta}$'s are the relations and $I,J$ are some indexing set. Then define a CW complex whose $0$-th skeleton $X^0 = *,$ a point. Corresponding to each $\alpha \in I$ we take a copy of $1$-cell, also calling it $a_{\alpha}$ (by abuse of notation). Then the $1$-skeleton $X^1 = \bigvee\limits_{\alpha \in I} S^1_{a_{\alpha}}.$ Now corresponding to each relation $r_{\beta}$ we attach a $2$-cell $D^2_{\beta}$ where the attaching map is given by sending $S^1$ to the loop $\prod c_{\gamma}$ where $r_{\beta} = \prod c_{\gamma}.$ Then by Van Kampen's theorem it follows that $\pi_1 (X^2) \cong G.$