Everything on a sailboat or ship that holds the sails up is its rigging. The rigging typically includes masts and ropes.
Sometimes the term rigging is used for just about everything on a sailing vessel, including the sails themselves. You can also use this noun for the process of adjusting or setting up these parts, either on a ship or an airship, parachute, or hang-glider. Rigging comes from the verb rig, which was originally nautical and meant just "to fit with sails."