Electrons can move from one energy level to another. This process requires energy. When energy is added to an atom, an electron can move from a lower energy level to a higher energy level. The terms HOMO and LUMO are often used here (Highest Occupied Molecular Orbital and Lowest Unoccupied Molecular Orbital). So an electron can move from the HOMO to the LUMO.
The HOMO is the lower energy level and the LUMO is the higher energy level. It is a bit confusing since the H in HOMO refers the the highest occupied level, not the highest level available. Similarly, the L in LUMO means the lowest unoccupied level, not the lowest level available. SO the electron starts in the occupied level (HOMO) and moves up to the unoccupied level (LUMO).
But the energy difference between these levels is quantized, or found in specific discrete units. So the amount of energy required will need to specifically match the energy difference in the atom's molecular orbitals. Also, when the electron returns from the higher energy level back to the lower energy level, the same amount of energy is released by the atom.