To replace a thermostat in a Jaguar XJ12, start by draining the coolant from the radiator using the drain plug or petcock. Locate the thermostat housing, usually connected to the engine block, and remove the bolts securing it. Take note of the orientation of the old thermostat before removing it and then install the new thermostat in the correct position. Reassemble the housing, refill the cooling system with fresh coolant, and check for any leaks or irregularities in temperature.