Buy a auto-scanner (<$50 in Amazon), you will find the code, indicating which part is broken. >99% is the oxygen sensor is bad, if driving >60K miles.
type: replace oxygen sensor in Google, you will see the Youtube, show you how to replace it. It is simple.