Here's a precise statement: reduced singular cohomology $H^n(X;G)$ is naturally isomorphic to homotopy classes of pointed maps from $X$ to $K(G,n)$, for any pointed topological space $X$ having the homotopy type of a CW complex. Explicitly, the identity map $G = \pi_n(K(G,n)) = H_n(K(G,n); \mathbb{Z}) \to G$ gives an element $i_n$ of $H^n(K(G,n);G)$, and the isomorphism is given by taking a map $f : X \to K(G,n)$ to the class $f*(i_n)\in H^n(X;G)$.
By Yoneda, the additive and multiplicative structure on $H^*(X;G)$ come from certain (homotopy classes of) maps $K(G,n) \times K(G,n) \to K(G,n)$ and $K(G,n) \times K(G,m) \to K(G,m+n)$, respectively. The addition map is actually quite easy to see: $K(G,n)$ is the loopspace of $K(G,n+1)$, so it has a natural binary operation $K(G,n) \times K(G,n) \to K(G,n)$ given by concatenating loops. Since $K(G,n)$ is actually the double loopspace of $K(G,n+2)$, the Eckmann-Hilton argument (the same argument that shows higher homotopy groups are abelian) shows that this operation is commutative up to homotopy. I don't know of a good way to see the multiplication map.
As for your second question, the answer should be yes whenever it makes sense. For any good notion of a smooth structure, it should be true that smooth maps up to smooth homotopy are the same as continuous maps up to continuous homotopy (at least, it is true for smooth manifolds). However, as far as I know there is rarely a natural smooth structure to put on $K(G,n)$, so this doesn't make sense (though I may be wrong!). In particular, to do de Rham cohomology you presumably want $G$ to be $\mathbb{R}$ or $\mathbb{C}$, and then $K(G,n)$ is really monstrous geometrically. You may want to take a look at this question.