How do electromagnetic waves transfer energy?

You must be familiar with the fact that, the energy density of an electric field is given as (epsilon""_0E^2)/2 and that of a magnetic field is given as B^2/(2mu""_0). Thus, the electric and magnetic fields transfer energy and momentum in form of changing electric and magnetic fields.