Good lesson. To take it a little further, all photons are not created equally since some have more energy than others. Different materials are made of atoms with electrons in different orbits and the energy absorbed must be the correct amount to move the electron of that atom from one orbit to another. The energy of a photon is tied to the frequency of the radiation through Planck's equation.
When an object is exposed to radiation, sunlight for example, the energy may be reflected away, absorbed, or simply pass through. These three properties are called the reflectivity, absortivity, and transmistivity. A fourth property is the ability of a material to emit radiation as the electron moves from the higher energy state to it normal condition is called emissivity. All four of these properties are dependent on the frequency of the radiation to which the object is exposed. Bear with me, we'll get there.
Since the electron may not take the same route back to its normal state, as the electron moves back photons are emitted (emissivity) at different wavelengths. Sunlight is allowed to pass through the glass in a car window (transmistivity) and be absorbed (absorbtivity) by the interior of the car. As the electrons make their way back to their normal position different wavelengths are emitted that can't pass through the glass window and often are reflected back (reflectivity) into the car causing it to heat up.
But the most amazing aspect of this is when radiation impacts an object and certain wavelengths are either reflected or emitted back out and reaches our eyes allowing us not only to see the object but see the object in color.