What happens if the oxygen sensor goes bad?

The check engine light will illuminate. The code(s) will direct you to the faulty sensor.