The aluminum spars consist of 2 pieces for the mast that slot in together, and the boom. The size of the spars varies depending on which rig you have (full, radial or 4.7).
More recently, upper and lower carbon or composite top and bottom mast sections have been approved for use. Carbon masts have a few advantages over aluminum spars since they don’t corrode and don’t suffer from the permanent bending problems that the aluminum masts can suffer from.
They are designed to bend (to give the sail the shape you want) when the vang, cunningham, outhaul and mainsheet ropes are pulled on. This allows the sail to be tuned (give the sail more twist or flatten it out) depending on the angle of breeze, and how hard the wind is blowing.