How do you repair an engine with a blown head gasket?

The head or heads will have to be remove and inspected for cracks or warpage. You then replace the gasket and reinstall the head. Drain the oil and change the filter. Replace the thermostat and pour in fresh coolant. Unless you ran it hot or drove it for a long period of time in this condition you may be ok. If you just kept driving it then you will have damage to the rings and bearings an the engine may need an overhaul. Really depends on how long the engine was driven with a blown gasket.