Before any of it, the machine gets set down safely: bucket on the ground, engine off, nothing that can move.
A crack can't just be welded over. If any of it stays in the joint, it can carry on right through the new weld. So the repair starts by cleaning the area to bare metal and finding where the crack really ends.
Then the crack comes out.
We gouge it with carbon arc, which melts the steel along the crack and blows it out with air. We keep going until there's sound steel on both sides and a clean groove to fill.
Thick or high-strength steel gets warmed first when the steel calls for it. Warming slows the cooling, so the steel beside the weld is less likely to crack.
Then the groove gets welded back up with wire feed or stick, pass after pass, until it's full. It's ground smooth and checked, which means what's left is a joint, not a patch.
Machines have their own welding rulebook, too. AWS keeps a welding specification for machinery and equipment, which sets requirements for design, manufacture, quality and inspection. Repair is on that list as well, so it covers the machine after it breaks, not only when it's built.