Correspondence between $[X;K(G,n)]$ and $H^n(X;G)$. I learnt this from Spanier and it is not very clear to me geometrically...
If I take a cohomology class in $H^n(X;G)$, is it possible for me to get an idea what exactly this map is in $[X;K(G,n)]$? For example, how can I possibly compute the homomorphism it induces $H^n(K(G,n);G)\to H^n(X;G)$?
Or conversely can I somehow think of a map that induces a given homomorphism on $H^n(K(G,n);G)\to H^n(X;G)$ as I wish? I know if I have $X=K(H,n)$ for the same $n$, it would be possible for me to transfer this info to the homotopy groups, but how about in general?
It seems I could refer to the simplicial construction of $K(G,n)$ (somebody recommended me to read May's Simplicial Objects in Algebraic Topology which does not feel to be a very easy reading for me) but I wish to hear some more thoughts if possible.
My example is $[\mathbb{T}^3;(\mathbb{C}P^\infty)^2]$ if this is helpful...
Thanks in advance!!
 A: If you give me a CW n-cocyle $\sigma$ on $X$, this is a map from the free abelian group on the cells to the group $G$. Now every map $f \in [X,K(G,n)]$ is homotopic to a map sending $X^{n-1}$ to a point, since $K(G,n)$ is (n-1)-connected. Thus, to give such a map $f$, up to homotopy it suffices to give a map $X/X^{n-1} \rightarrow K(G,n)$. The first thing we must do is describe what it does on the n-skeleton of this space. By elementary topology, the homotopy classes of maps from a wedge of spheres into $K(G,n)$ is a product over the spheres of $G$, which is the same as homming out from the free abelian group labeled by the cells.
We thus see that our cocycle $\sigma$ gives us a map on the n-skeleton of  $X/X^{n-1}$. The fact that $\sigma$ is a cycle, one can check, is equivalent to the fact that this map extends to the (n+1)-skeleton. From there, one uses the fact that the higher homotopy groups vanish to extend the map to the rest of $X/X^{n-1}$, and there are no further obstructions.
Of course, one needs to check that these extensions are well defined up to homotopy.
So this is a formula for how to do it in general. If you want explicit maps, this will come down to calculating nullhomotopies of maps from spheres into your model of $K(G,n)$.
