Best to get an O2 socket, which has the slot up the side to accommodate the wiring. I use a 1/2 inch drive ratchet wrench for leverage. Spray the sensor threads with penetrating oil while the engine is warm, let it cool down a little, then attack from above. Be certain that the socket is fully seated on the hex, or you will round it off. If the wires of the old sensor won't permit it to seat fully, cut the wires flush with the sensor. Use only NTK or Denso for replacement - NOT Bosch.
Put the anti-seize compound on the threads of the new one, but do NOT get any on the sensing body element, it will cause premature failure.
I'll add to Bob's advice above. I have two O2 sensor sockets. One was thin wall and would flex at the slot and would try to round off the sensor making removal difficult I bought a second thick walled one and it worked much better.
When I did the upstream O2 sensor on our '98 Jeep 4.0 I found it much easier to get it out when the engine was hot, it would not budge with it cold, even with penetrating oil soaking in. Just be careful around hot exhaust, wear fireplace gloves or similar.
The last time I removed an O2 sensor on one of my Acclaims (2.5L) I had to use a breaker bar to break it loose. And that was after getting the engine to operating temperature. Once it broke loose it came out easily.
Use only a minimial amount of antisieze on the new one if any at all.
Do not spray any penetrating oil on the electrical connection, clean the connector in the harness with something that evaporates totally.
- this is because its possible for these products to enter the air reference intake on the new sensor and if that happens its destroyed.