To find the location:
1. Consult a repair manual: A Haynes or Chilton repair manual specific to your 1997 Cavalier will show you diagrams with the exact location of the O2 sensors for your particular engine. This is the most reliable method.
2. Look under the car: The upstream sensor is usually located in the exhaust manifold or close to it. The downstream sensor will be further down the exhaust pipe, after the catalytic converter. You'll likely need to get underneath the car to see them clearly. They are usually threaded into the exhaust pipe.
3. Use a parts diagram: Many online auto parts stores (like AutoZone, Advance Auto Parts, etc.) allow you to select your car's year, make, and model, and then view a parts diagram. This can often show you the location of the O2 sensor.
Important Note: O2 sensors are generally located in hot areas. Allow the exhaust system to cool down completely before attempting to locate or replace them. Use appropriate safety precautions, including gloves, to avoid burns.