Replacing the thermostat is a simple process which should be done every 2-3 years at least.
If your XJ is overheats, that would be the first place to look for problems.
The replacing process should be done as follows:
1. Wait for your Jeep to cool - you do not want hot coolant on your hands...
2. Disconnect the heat unit
3. Disconnect the 2 pipes which are connected to the thermostat housing
4. Remove the 2 screws on that housing (should be 1/2" socket)
5. Remove the thermostat and clean it area of old gasket/RTV/rust any other material which is there
6. Install new thermostat (pay attention to its direction)
7. Install new gasket, I would put a thin layer of RTV as well.
8. Screw the thermostat housing back in place.
9. Connect the coolant pipes and heat unit.
10. Add coolant and let the engine for for few minutes, verify it is not overheating,
make sure the new thermostat is opened when it should (the pipes should be hot and full with coolant, so when you'll squeeze them, you will feel the coolant inside)
All of that should take ~30 minutes.
We found a nice video on youtube which show the process in details: