Flame test
A flame test is a test for chemicals. Normally it is used to see whether there are certain metals in a chemical compound. The chemical compound is heated in a flame and a colored flame is made. The colored flame can be turned into its spectrum to analyze it. Many metals produce flame colors. The colors are made by electrons jumping up to higher orbits in the atom when it is heated. They fall down soon, putting out light as energy.
Flame test for potassium
Flame test for calcium
Flame test for sodium. The yellow color is very bright and common.
Flame test for copper
Flame test for lithium

Wikimedia Commons has media related to Flame test.