For based spaces $X$ and $Y$ there is a map $\pi_i(X)\times \pi_j(Y)\to \pi_{i+j}(X\wedge Y)$ given by
$$
(a:S^i\to X,b:S^j\to Y)\mapsto (a\wedge b:S^i\wedge S^j\to X\wedge Y).$$
This function of $a$ (resp. $b$) is a homomorphism if $i$ (resp. $j$) is positive.
Thus a space-level multiplication of the form $X\wedge X\to X$ gives a graded ring structure to $\pi_\ast(X)$ (except maybe on $\pi_0$ and $\pi_1$).

In particular this is so if $X=\Omega^\infty E$ is the infinite loopspace of a spectrum and you have a spectrum map $m: E\wedge E\to E$. In this case you have abelian groups $\pi_i(E)$ for all $i\in \mathbb Z$, not just $i\ge 2$, and $m$ makes this a graded ring.

Note: smash product, not cartesian product.

Edit: Here is the promised elaboration. This is extremely sketchy. It would probably be pointless to try to avoid mentioning spectra here.

When you have a spectrum you have a very special sort of $H$-space, an infinite loopspace. If $X$ is a loopspace, say $X=\Omega Y$, then this gives a group structure to $\pi_0X$ and makes the group $\pi_1X$ abelian (and has lots of other consequences, too, for the homotopy type of $X$). If $X$ is a double loopspace, the loopspace of a loopspace, then it is an even more special kind of loopspace. $\pi_0X$ is now abelian. In fact, the multiplication $X\times X\to X$ is now commutative up to homotopy. When you have a spectrum $E$, you have a sequence of spaces $E_n$ in which $E_n$ is (at least weakly homotopy equivalent to) $\Omega E_{n+1}$. The homotopy groups of the spectrum are defined by $\pi_kE=\pi_{k+n}E_n$. The space $E_0$ is then homotopy-commutative in a very strong sense.

You can think of infinite loopspaces as a generalization of topological abelian groups. Let's think of the 'multiplication' in such an $H$-space as addition, because we now want to think of the possibility of another binary operation called multiplication that makes this generalized abelian group into a generalized ring. A ring spectrum is a spectrum $E$ together with a map of spectra $E\wedge E\to E$. The smash product $E\wedge F$ of two spectra is somewhat awkward to define. Its homotopy groups can be described by saying that $\pi_k(E\wedge F)$ is the direct limit of $\pi_{k+m+n}(E_m\wedge F_n)$. A map $E\wedge F\to G$ gives you a map $\pi_iE\otimes \pi_jF\to \pi_{i+j}G$. The homotopy groups of a ring spectrum form a graded ring. As a very special case, suppose that $A$ is a simplicial abelian group, i.e. a simplicial set with a suitable addition law. It is an infinite loopspace: you can deloop it by explicitly writing down another such object; if you replace simplicial abelian groups by nonnegatively graded chain complexes using the Dold-Kan equivalence, then it's just a matter of regrading, shifting the chain groups by one dimension. (The homology groups of the chain complex are the homotopy groups of the realization of the simplicial set.)

As a very special case: If $A$ is not just a simplicial abelian group but a simplicial ring, then the spectrum becomes a ring spectrum. The multiplication in homotopy groups can be described either by writing down a multiplication on the chain complex level or by noting that the multiplication $A\times A\to A$ takes $A\times 0\cup 0\times A$ to $0$ and so gives a map $|A|\wedge |A|=|A\wedge A|\to |A|$. (Now look at the beginning of my answer above.)

More generally, if $X$ is the infinite loopspace $E_0$ of a ring spectrum $E$, then you always get a map $E_0\wedge E_0\to E_0$.

The algebraic $K$-groups of a ring are in fact the homotopy groups of an infinite loopspace, or of a spectrum. You make the spectrum by using a category of $R$-modules. If $R$ is commutative then the spectrum is a ring spectrum. The multiplication is related to tensor product of $R$-modules.

spectrum. (If you want to stick with spaces, you can in turn model this as an infinite loop space, i.e. a space which can be expressed as the form $\Omega^nX_n$ for some space $X_n$, for every $n$.) When you're starting with a ring, the spectrum you get is always a ring spectrum, which is the spectrum version of an $H$-space. I don't actually know why this is true, but I'd guess it pops out of one of the various constructions of this spectrum. – Paul VanKoughnett Mar 22 '13 at 2:32