The oxygen (O2) sensor in modern automobiles is an electronic sensor that helps monitor and control the engine air-to-fuel ratio. Most O2 sensors are part of the exhaust assembly and do not directly sense the air-fuel ratio, but the data they collect from the exhaust gases is used by the on-board computer to determine if the engine is running too rich or too lean. Newer O2 sensors have an internal heating element; to change the O2 sensor heater, you change the O2 sensor. Changing the heated O2 sensor in a Toyota Tercel requires a specialized tool and is a relatively quick repair.
Disconnect the electrical connector for the oxygen sensor.
Loosen and remove the mounting bolts for the oxygen sensor.
Use the oxygen sensor socket to unscrew the oxygen sensor and remove it.
Install a new sensor and tighten using the oxygen sensor socket.
Screw the mounting bolts in place and connect the electrical connector for the new oxygen sensor.