Electrons become excited when they absorb energy. In an atom, electrons prefer to stay in the orbitals closest to protons, known as the ground state. When given energy, electrons move to a higher energy level, known as an excited state.
In the Bohr model of an atom, neutrons and protons are located in the nucleus, with the electrons orbiting around. Electrons are negatively charged particles and protons are positively charged particles. Therefore, electrons and protons attract each other, causing electrons to fill the orbitals closest to the nucleus first. Electrons move into higher orbitals when giving energy, but shortly after, will move back to the ground state by emitting a proton. An example of an electron in an excited state is the electron of the hydrogen atom when it is in the n=2 orbital. When in the n=1 orbital, it is in the ground state.