Atoms
Much of what scientists know about atoms was discovered by studying atomic spectra. As early as the mid 19th century, scientists noticed that when elements such as sodium or potassium were heated, they always emitted light at certain characteristic wavelengths. The collection of these wavelengths for a given element is called its emission spectrum, and each element has a unique emission spectrum. Not only did emission spectra provide valuable clues to the nature of atoms, they also proved useful as a means of identification for various elements.
Flame
The flame on a Bunsen burner doesn't emit a lot of light -- much more heat than light, in fact, and the flame is ordinarily a faint blue color. When you stick a sample of an inorganic salt into the flame, the metal ions in the salt become excited and emit at the wavelengths characteristic for their elements. Those emissions lend the flame a new color. For some metals, you can use that color to identify the metal ion present in the salt.
Colors
Lithium is bright red in an ion flame test, while calcium is orange-red. Barium is green, potassium is lilac or pink, and sodium is an extremely bright yellow-orange. Copper is blue-green, and strontium is a red color like lithium. If you're having trouble distinguishing two elements with similar colors, ask a partner to view the flame through a hand-held spectroscope as you add the salt. Either you or your partner can then record the position of each spectral line, convert this to a wavelength and compare it with emission spectra for various elements to figure out what it is.
Considerations
You should keep the salt sample on a watch glass. To add it to the flame, you can dampen a nickel-chromium alloy wire into some hydrochloric acid and hold it in the flame to clean it. Next, re-dampen the wire's tip with hydrochloric acid, stick the tip into the salt to pick up some of it, then reinsert the wire tip into the flame. The wire will generally lend a little orange to the flame, so you have to take this into account when identifying the salt. Never try to perform this procedure unsupervised or outside of a chemistry laboratory -- an open flame can potentially be very dangerous.