Photon interacts with matter in two effects one is Photoelectric Effect and another one is Compton Effect.
Photoelectric effect is one type of interactions by photons in which the photon interacts with one of the orbital electron and ejects also. Photoelectric effect is predominant mode of interactions at low energies.
The atomic photoelectric effect involves the absorption of a photon by an atomic electron which is then ejected from the atom. This can occur only when the incoming photon has an energy greater than the ionization energy (EB) of the electron to be removed. Since an atom is much more massive than an electron the ejected electron takes practically all the energy and momentum of the photon. The kinetic energy (K) of the ejected electron is then K = hf - EB. The ejected electrons are known as photo electrons and, since the atom is ionized, the process is one form of photoionisation.
The graph showing how attenuation varies with photon energy, the general decrease of μm with increasing energy is interrupted by a series of jumps, called absorption edges, which occur at a unique set of energies for each element. An absorption edge occurs when the photon is energetic enough to eject an electron from one of the deep energy levels in the atom. If a photon's energy is even just a little bit less than that required raising the tightly bound electron to a vacant energy level, then that photon cannot interact with the inner electron. On the other hand, if the photon's energy were to be made equal to or greater than the required energy, the interaction suddenly becomes possible. So there are sudden changes in interaction probabilities and attenuation coefficients at photon energies corresponding to quantum jumps between filled and unfilled energy levels of atoms in the absorber. The edge with the highest photon energy corresponds to an interaction with an electron in the K-shell. The next set of edges corresponds to the group of closely spaced energy levels in the L-shell. The energies of the absorption Edges are characteristic of each element and, like spectra, they can be used to identify elements.