The law of conservation of mass states that in a chemical reaction mass is neither created nor destroyed. For example, the carbon atom in coal becomes carbon dioxide when it is burned. The carbon atom changes from a solid structure to a gas but its mass does not change.
providing energy to an atom can allow the electron in its non valence shell to obtain energy and move to a higher energy orbital and act as a valence electron.