There are a few things that can cause an oxygen sensor to fail, including:
* Normal wear and tear: Oxygen sensors typically have a lifespan of 100,000 miles or so. After that, they can start to degrade and fail.
* Exposure to extreme heat: Oxygen sensors are exposed to very high temperatures in the exhaust system. If the sensor is exposed to too much heat, it can damage the sensor and cause it to fail.
* Contamination: Oxygen sensors can be contaminated by a variety of things, such as oil, coolant, and dirt. This contamination can interfere with the sensor's ability to accurately measure the oxygen content of the exhaust gas.
If you see the check engine light come on, it's important to have your vehicle inspected by a qualified mechanic. They will be able to diagnose the problem and determine if the oxygen sensor is the cause. If the oxygen sensor is the cause, the mechanic will replace it and reset the check engine light.