Mast and derrick are used to support load from hoisting system and drilling load. However, they are different.
Referring to the API definition, a mast is a structural tower comprised of one or more sections assembled in a horizontal position near the ground and then raised to the operating position. If the unit contains two or more sections, it may be telescoped or unfolded during the erection procedure. Generally, masts are assembled on the ground in a horizontal position and then are raised using the draw works. Some masts use telescopic sections and are assembled in a vertical (boot strap) fashion. Masts are normally used on land rigs; they are rarely used on offshore rigs.
A derrick is a semi-permanent structure of square or rectangular cross-sections having members that are latticed or trussed on all four sides. This unit must be assembled in the vertical or operation position, as it includes no erection mechanism. It may or may not be guyed. A derrick is normally used on offshore rigs and they can be divided into two categories; stationary derricks and dynamic derricks.
A stationary derrick is used on offshore fixed structures and jacked up rigs, whereas a dynamic derrick is used on a floating rig, which is subjected to marine stress.