This article has vector images embedded, these are handled fine by most modern browsers, but if you can't see the images, just click them to view _backwards compatible versions
This is a bit of a technical post, but it's information that might be useful to you later, so feel free to look at the pictures and come back to it when it's more relevant._
When a beam is loaded in pure bending, there are no forces applied along the length of the beam (no axial load). In a state of pure bending, for small deflections, it is assumed that the cross-section of the beam remains perpendicular to the local longitudinal direction (no longitudinal shear).
When a beam is supported at each end and a central force applied, this is a pure bending situation known as three point bending:
As the straight, square cross-section beam is loaded, it will deflect downwards at the centre, causing the top surface of the beam to be compressed along it's length and the bottom surface to be elongated as the beam curves. At the centre of the beam's thickness, the line of the neutral axis is the only part of the beam through it's depth where there is neither tension nor compression. <!-- more -->
Because the beam is in equilibrium (static, and with no unbalanced forces), the amount of total compression of the top of the beam is equal to the amount of the total tension of the bottom of the beam.
The change from compression at the top to tension at the bottom is linear through the thickness of the beam, so there is an area around the middle of the beam where — in a square, solid, single material beam — the material is quite lightly loaded.
Box section beams, and alternative cross sections like I-beams use less material, but can carry the same load in bending as a solid, square beam; but there is another alternative, a beam made from two component materials.
If the strong material is only used for the top and bottom surfaces, the middle area, which is under less stress from bending can be filled with a lower mass material that cannot carry as much load, but that is effectively just there to keep the two stronger portions at the right distance apart from each other.
In three point bending, the beam also carries a shear force due to the opposing vertical loads, so this must also be taken into account for material selection.