Welding works by running lots of electricity through a material.
Lots of electricity makes lots of heat.
Things get so hot that water turns to gas and gases turn into plasma. (which is conductive, so it helps even more electricity flow!)
Metal liquefies from the heat and mixes together.
This can work anywhere that something very conductive (like metals) is surrounded by something much less conductive (like air/water) because the more conductive areas absorb waaay more heat.
Latest Answers