The standard approach to proving that $H^n(X; G)$ is represented by $K(G, n)$ seems to be to prove that $\text{Hom}(X, K(G, n))$ defines a cohomology theory and then use Eilenberg-Steenrod uniqueness. This is utterly spiffing, but as far as I can see gives little geometric intuition. In his treatment, Hatcher mentions that there is a more direct cell-by-cell proof, albeit a somewhat messy and tedious one. I haven't been able to find any such proof, but I'd really like to see one; I think it would help me solidify my mental picture of Eilenberg-MacLane spaces. Does anyone have a reference?
[Math] “Dirty” proof that Eilenberg-MacLane spaces represent cohomology
at.algebraic-topologyhomotopy-theory
Related Solutions
We are working in the homotopy category of topological spaces where morphisms are homotopy classes of continuous maps. More accurately, we tend to work in the based category where each object has a distinguished base point and everything is required to preserve that base point. The non-based category can be embedded in the based category by the simple addition of a disjoint base point, so we often pass back and forth between the two without worrying too much about it. The cohomology theory itself is slightly more interesting. For CW-complexes, it doesn't matter which one you choose as they are all the same. However, outside the subcategory of CW-complexes then the different theories can vary (as was mentioned in another question). So what we do is the following: using Big Theorems we construct a topological space, which we call $K(G,n)$, which represents the $n$th cohomology group with coefficients in $G$ for CW-complexes. So whenever $X$ is a CW-complex, we have a natural isomorphism of functors $\tilde{H}^n(X;G) \cong [X, K(G,n)]$, where the right-hand side is homotopy classes of based maps. For arbitrary topological spaces, we then define cohomology as $[X, K(G,n)]$. If this happens to agree with, say, singular cohomology then we're very pleased, but we don't require it.
Depends what you mean by "smooth structure". Certainly in the broadest sense, you will get different answers if you insist on everything being smooth. But for smooth manifolds, continuous maps are homotopic to smooth maps (and continuous homotopies to smooth homotopies) so the homotopy category of smooth manifolds and smooth maps is equivalent to the homotopy category of smooth manifolds and continuous maps. However, you need to be careful with the $K(G,n)$s as they will, in general, not be finite dimensional smooth manifolds. However, lots of things aren't finite dimensional smooth manifolds but still behave nicely with regard to smooth structures so this shouldn't be seen as quite the drawback that the other answerants have indicated.
Addition in $\tilde{H}^n(X;G)$ translates into the fact that $K(G,n)$ is an $H$-space. The suspension isomorphism, $\tilde{H}^n(X;G) \cong \tilde{H}^{n+1}(\Sigma X, G)$ implies the stronger condition that $K(G,n)$ is the loop space of $K(G,n+1)$ and so the $H$-space structure comes from the Pontrijagin product on a (based!) loop space. But the basic theorem on representability of cohomology merely provides $K(G,n)$ with the structure of an $H$-space.
As for the ring structure, that translates into certain maps $K(G,n)\wedge K(G,m) \to K(G,n+m)$. I don't know of a good way to "see" these for ordinary cohomology, mainly because I don't know of any good geometric models for the spaces $K(G,n)$ except for low degrees. One simple case where it can be seen is in rational cohomology. Rational cohomology (made 2-periodic) is isomorphic to rational $K$-theory and there the product corresponds to the tensor product of vector bundles.
(It should be said, in light of the first point, that $K$-theory should only be thought of as being built out of vector bundles for compact CW-complexes. For all other spaces, $K$-theory is homotopy classes of maps to $\mathbb{Z} \times BU$.)
You can build them using a homology decomposition and read off the number of cells in each dimension from the homology groups.
For any simply-connected space, this will give you a construction by iterated cofiber sequences $M_n \to X(n-1) \to X(n)$ where $M_n$ is a Moore space and $X = \mathrm{colim} X(n)$. If you construct $M_n$ efficiently and give $X(n)$ the inherited CW structure, then this will be the absolute fewest cells possible in each dimension to construct a space with the required homology.
By an efficient construction of $M = M(G,n)$ where $G$ can be generated by $k$ elements but not fewer, and an exact sequence $0\to F_1\to F_0\to G\to 0$ where $F_0$ is free of rank $k$. Then we topologize this to get a cofiber sequence $W_1 \to W_0 \to M$, where $W_0$ is a wedge of $k$ $n$-spheres and $W_1$ is also a wedge of $n$-spheres.
Best Answer
I'd suggest looking up some basic material on obstruction theory. There, you generally find classification of maps $X \to Y$ with domain a CW-complex in terms of cohomology groups $H^s(X;\pi_t(Y))$. The proofs are often very cellular indeed.
In the case where the range is an Eilenberg-Maclane space (for an abelian group), the dirty proof is something like:
This is a little messy. Often it's nice to use the filtration of $X$ by subcomplexes $X^{(n)}$ and use that each inclusion in the filtration induces a fibration of mapping spaces $$F(X^{(n)}/X^{(n-1)},Y) \to F(X^{(n)},Y) \to F(X^{(n-1)},Y)$$ to clean this homotopical analysis up a little into something slightly more systematic. This leads to a spectral sequence for the homotopy groups of the mapping spaces in terms of the cohomology of $X$ with coefficients in the homotopy groups of $Y$, but you have to be a little careful because there is a "fringe" that exhibits some non-abelian-group-like behavior.