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.