EM radiation interacts with matter by interacting with the electrons in atoms. The more atoms you have per unit volume, the larger the probability of interaction. In general, the higher the energy of the radiation, the less the chance of interaction as well. The three major types of interactions are photoelectric effect, Compton scattering, and pair production (which needs photons of greater than 1.02MeV in order to happen). PE dominates at lower energy, Compton in the 100keV to 10MeV range, and PP dominates after that. EM radiation that doesn't interact either passes through or reflects off without transferring energy to the material. The longer the wavelength (e.g., visible light) the more likely it is to just reflect off rather than pass through, though some materials allow it to pass through (e.g., glass and other transparent materials). Bone and tissue have different densities, which is why you see the contrast between them.
This makes lead an effective shield (DU, tungsten, and several others such as platinum or plutonium are even better, but more expensive or rare) against most EM, but only if it is thick enough.