A flame test can be used to identify some metal ions, which are also called cations. A clean wire loop is dipped into the sample and held in a blue Bunsen burner flame. The metal ions give the flame a colour that depends on the metal.
Five colours need to be known. Lithium compounds give a crimson flame, sodium compounds give a yellow flame and potassium compounds give a lilac flame. Calcium compounds give an orange-red flame and copper compounds give a green flame.
Flame tests work best on a sample with one metal ion. If the sample is a mixture of ions, some flame colours can be masked by others, so the colour you see may be misleading. The flame colours of other metal ions are not needed at GCSE.