Excitation of electron in Niels Bohr's atomic model
Quantum mechanics received its name from the concept of the &quot;quantum&quot; which is Latin for &quot;how much&quot; or &quot;amount&quot; and is used to mean &quot;small discrete piece or fragment&quot;. Classical physics prior to the development of QM described the energy of bodies as a continuum of possibilities. The novelty introduced by QM was the idea that within the continuum only a subset of the possible energies are in fact allowed, corresponding to allowed states. This means by extension that the energies of a body in different possible states differ by discrete rather than continuous amounts. This discreteness becomes increasingly evident for small and confined systems, where the wave-like properties of matter become more evident, as demonstrated for instance by the self-interference of the electron wavefunction in the double-slit scattering experiment.
Electrons in atoms fulfill all of the conditions for observation of QM phenomena. The particles involved are subatomic (very small) and are confined (by a Coulombic potential). The result is that electrons in atoms exist in a discrete number of allowed states, each state defined by a fixed energy and wavefunction that can be interpreted as the probability distribution of the electron.
When an atom is excited by a photon (a discrete light particle with a fixed amount of energy) it absorbs the entire photon. All of the photon's energy is acquired by the atom. However, such an excitation implies a transition between possible states of the atom. It is necessary that the energy of the photon match the difference in energy of the atomic states. In the case where the two states are bound (if an electron is not excited into the continuum of ionized free states) the result is that only a subset of photon energies can be absorbed by the atom.

As noted by Shoubhik R Maiti, photons can also be scattered by atoms and in the process transfer only part of their energy to the atoms. However the principle and meaning of quantization of electronic states remains the same. Electronic states are quantized (discrete) and so only particular amounts of energy can be absorbed (quanta corresponding to differences in energies of discrete levels).