It all has to do with the absorption and emission spectra of the atoms in the gain medium. Almost every laser is capable of lasing on different wavelengths, though not always simultaneously. The same Nd:YVO4 in a typical green laser pointer could theoretically also create the primary harmonic for red and blue lasers.
For example, here's the energy level structure for Nd:YAG:
As you can see, it's not limited to just one emission line, but 4 of them.
For example, the 589nm yellow handhelds from CNI that are fairly common around here use an Nd:YAG crystal lasing on the 1064nm and 1319nm line simultaneously.