Ships utilize a combination of lightning rods, grounding systems, and surge protection devices to mitigate the risks associated with thunderstorms. These systems aim to either prevent lightning strikes or safely conduct the electrical discharge into the water, minimizing damage to the vessel and its equipment.