The short answer: "shadowing out" of high frequencies and passive resonance.
The detailed answer:
The hands act as "low-pass" filters (they block out the higher frequencies). Almost everywhere has some form of background sound, but we tune it out. We notice changes in noise level and/or frequency. This is why you can "hear the ocean" through a seashell: you only notice "sound" when it changes as the shell is put near your ear.
Why are hands and shells a low pass filter? Sound waves have no trouble pushing/passing-through thin solid objects. But how thin is "thin" depends on the wavelength: there should be as much kg/m^2 of air in a 1-wavelength thick slab as there is object to pass through. Very long wavelength, low frequency sounds can penetrate through hands.
There is also a resonant chamber effect: the resonant frequency of an open bottle will drop as the neck gets narrower, which is roughly what happens when the hands move closer. The frequencies of external sounds that are at or near the resonant frequency will generate strong standing waves in the chamber.
Passive resonance is not amplification, it's energy transferral. A large volume of low-intensity background waves must give up it's energy in order to create a small volume of high-intensity chamber waves. A similar phenomena happens in an acoustic guitar string: the chamber "amplifies" sound by efficiently robbing energy from the string (via the vibrations in the wood) and giving it to the air.