The electrons are bound to the nucleus, because opposite charges attract .
Electrons can only be in certain permitted orbits , also referred to as energy levels .
The lowest one is called the ground state , and that is the usual position for the electron. If the electron is in a higher energy level, the atom is in an excited state . Energy must be given to the atom to move it into the exited state. The atom can absorb a photon , or packet of light energy, and that will put it into an excited state. The important thing to note here is that, because the only orbits allowed for the electron are the permitted orbits, the photon must have just the right energy to bump the electron up one or more energy levels.