This question is related to [this question](https://mathoverflow.net/questions/1346/representablity-of-cohomology-ring) from Dinakar, which I found interesting but don't yet have the background to understand at that level.


Unless I'm mistaken, the rough statement is that $H^n(X;G)$ (the $n$-dimensional cohomology of $X$ with coefficients in $G$) should somehow correspond to (free?) homotopy classes of maps $X \to K(G,n)$. I want to understand this better, in relatively elementary terms. Here are some questions which (I hope) will point me in the right direction.


1. What category are we working in? My guess is that $X$ should just be a topological space, the cohomology is singular cohomology, and our maps $X \to K(G,n)$ just need to be continuous.
2. Does this carry over if we give $X$ a smooth structure, take de Rham cohomology, and require our maps $X \to K(G,n)$ to be smooth?
3. How does addition in $H^n(X;G)$ carry over?
4. How does the ring structure on $H^\*(X;G)$ carry over? (This has probably been adequately answered to Dinakar already.)



Cohomology and Eilenberg-MacLane spaces
1. 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.
2. 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.
3. 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.
4. 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$.)


