Underwater welding is used for pipelines, ships and vessels, and mining operations. It can be done through wet welding, which involves welding directly in water using special electrodes, or dry welding inside a sealed chamber. Wet welding is faster and cheaper but has risks of electric shock and poor visibility in water, while dry welding allows for higher quality welds and safety inspections but is more expensive. Proper equipment, training, and precautions are needed to address risks like pressure changes and shark attacks when welding underwater.