An atom in an excited state is one whose electrons have moved to a higher energy level.
In an atom, electrons are typically found in specific energy levels or orbitals. When an electron absorbs energy, it can move from a lower energy level to a higher energy level, which is referred to as an excited state. In this higher energy state, the electron is farther from the nucleus and has more potential energy. When the electron returns to its lower energy level, it emits the excess energy as electromagnetic radiation, often in the form of visible light. This is what gives rise to the characteristic spectral lines observed in spectroscopy.