To replace an oxygen sensor you will need a special tool. This tool looks like a deep well socket with a slot cut into its side. Use this socket to both remove and replace the oxygen sensor. Unplug the electrical wires and remove with the socket. Install the new sensor and plug in the electrical wires.