There are circumstances that can cause a ship to lose its mast. A mast break can be the result of strong winds that come up during a storm and act on the masts, sails, rigging and spars, causing them to break. Also, too much compression of the mast due to over-tightening of the rigging and g-forces as a result of swell and rocking of the boat can lead to a mast break. Or hits during a battle can lead to mast breakage.
Defence of the moles of Havana, British ships in the Seven Years War before Havana, by Rafael Monleon Torres (1843- 1900) A dismasted ship in the front (x)
Now this does not necessarily affect the ability of the ship to stay afloat, but rather the ability to move with sail power. Often the hull of the vessel remains intact, upright and seaworthy. But it can be immediately life-threatening if a mast falls on the crew or crew members who were in the rigging position at the time. But it can also be dangerous directly after the fall, because parts of the mast and rigging and sails can still be on the ship and thus still slip into the water afterwards, dragging sailors with them. Therefore, it must be ensured as quickly as possible that these parts are removed in order to eliminate these sources of danger.
HMS "Iris" dismasted by the French Frigate "Citoyenne-Francaise" 13 May 1793. Thomas Luny, date unknown (x)
If calm has returned and the ship has had the opportunity to anchor safely, then the large stocks of ropes, canvas and even spars for ordinary and extraordinary repairs have been anchored and any remaining mast used to create a jury rig with which to proceed. If safe anchoring was not possible and other ships were nearby, the ship could be towed to another location for repairs.