Subaru outback engine sputtering

What would cause my engine of my subaru to sputter and over heat

Possibly the problem is due to bad headgaskets. It could be a bad thermostat also.

The sputtering is likely due to the overheating and severe at that. Don’t drive it or any car in this condition. Tow it.