By using flame test we can identify the elements because colors which are given by elements with flame test are unique.
During the flame test, the electrons of the atom which are in ground state absorb energy and go to upper level. This is called electron excitation. Excited electrons are unstable. Hence, they come back to the ground state by emitting the energy as photons.If that released energy has a frequency which belongs to visual light, then that wave gives a color.
Normally, it explains that matter cannot be created or destroyed. It demonstrates different chemical reactions that help show the different transformations of the matter but will never destroy it or create it.