Hi.
Hot things glow. The hotter something is, the more light it emits. Also, hotter things emit light at higher frequencies. The burner on an electric stove glows red. The filament in your light bulb is hotter and so it glows yellowish-white. A deer's body temperature is much cooler so it glows infrared. Matter falling into black holes is extremely hot and glows at X-ray frequencies. The leftover glow from the big bang is very cold and glows at radio wave frequencies. This phenomenon is called "thermal radiation." Planck's blackbody equation tells exactly how much light (thermal radiation) you get at each wavelength for a given temperature for ideal objects.
If you look at a deer, it doesn't look infrared. It looks brown with tufts of white. Part of the problem is that humans can't see infrared. The other part of the problem is that the deer's fur is reflective, so when sunlight hits it the colors forming brown get reflected. Planck's equation doesn't predict this! But nobody ever expected it to. What we do is we say that there are two mechanisms to get light from a deer's fur: thermal radiation and reflected sunlight. Then we say that an "ideal deer" is one that doesn't reflect any sunlight; any light that hits it gets absorbed, so all the light you see from this ideal deer is thermal radiation. Now, "ideal deer" is a stupid name. It doesn't matter that it's a deer; what matters is that it doesn't reflect light. Black things don't reflect light, so we'll call it a "blackbody." So a blackbody is an ideal object that doesn't reflect any light, so when you look at it all the light you see can be described by Planck's "hot things glow" equation.
Imagine a hollow aluminum box with mass 500g. You're inside this box and you look around. What do you see? Nothing. The box is closed so it's dark in there. But if you have infrared goggles, you'll find that you're able to see anyway. Why? Is infrared light leaking in from the outside? No! The walls of the box are warm. Because they're warm, they glow. So there's all of this infrared thermal radiation inside the box with you.
Next question: What's the specific heat of the box? That is, how many joules of heat do you have to apply to the [outside of the] box in order to increase its temperature by 1 Kelvin? Well, everybody knows that the specific heat of aluminum is 900 Joules per kilogram-Kelvin, so if it's a half-kilogram box, you'd expect to need 450 joules of heat to make this box's temperature go up by one Kelvin. But when yo do this experiment, you find that 450 joules of heat cause the box's temperature to go up by only 0.998 Kelvins. (I made that number up, but it could be valid for a fantastically large box. Pay attention to the argument, not the actual numbers, from this point on.) So you really need 451 joules of heat to increase the box's temperature by a full Kelvin. Why? Where does that extra joule of energy go? It can't be in the aluminum, because aluminum heats up faster than that.
The extra energy is stored in those infrared photons that are bouncing around inside the box. It's true that every photon that jumps off one wall will soon be reabsorbed by another wall, but at any particular moment a certain number of photons are still "in flight" and they carry with them some energy. How much energy? For this particular box, all the blackbody photons in flight inside the box at any given time have energies that add up to the missing joule. Great, mystery solved! The empty space inside the box is like a heatsink. It can store thermal energy in the form of photons-in-flight, and those photons are thermal radiation photons.
Back to the original question: "How can the energy in the electromagnetic field be responsible for the ability of a hollow cavity to absorb heat?" Answer: Light is an electromagnetic wave. Replace "energy in the electromagnetic field" with "energy in all those thermal photons that are bouncing around" and you get my explanation.
[Edited in response to comments from lightarrow: Changed "blackbody radiation" to "thermal radiation" where appropriate. The thermal emission curves of most materials are very similar to blackbody radiation, up to a constant called `emissivity.' Lots of folks use the word 'blackbody' to cover all of these cases, even for approximations more appropriately called `greybody' and even some approximations that don't really fit it at all. But that isn't really correct, as lightarrow points out. Blackbody radiation is the spread of wavelengths for an ideal object, and "thermal radiation" is a better way to refer to similar light coming from non-ideal objects.]