There are three basic ways.
First is "spot color" printing. You do it this way when you're only putting one or two colors in the job, although I actually saw someone attempt to do it with four...
There are various types of inks used in commercial printing. Currently the most popular inks are soy based and ultra violet. Soy based inks work best with heat-set presses, which use an actual flame...