The after-Cat (down stream) sensor is a sanity check on the Cat mandated by the Feds for emission control. It verifies the Cat is operating. Some folks have replaced them with a sensor simulator. Quite against the law, unless the rig is trailered ot the trail head...
The upstream sensors are a different matter. The sensor logic used by the PCM is RICH-STOICHIOMETRIC-LEAN. It is all it knows. If rich, it cuts full from the map, if lean, it adds fuel to the map. During operation, the PCM "learns" what the engine is doing (via the O2 sensors) and overrides the default data. Problem is, the PCM has to trust the O2 sensors. It assumes the values are good. We have what are known as narrow band sensors. Limited resolution.
Should one of the two you have fail in the RICH bias (unable to read rich) area of operation, the PCM will think that half of the engine has gone lean and will add fuel. Dropped mileage and poor emissions are what you get.
Some say to replace the sensors at 70,000 miles, others will say 100,000 miles. Either way, they are a maintenance item. I can tell you, that when I was prepping my Heep for the Supercharger installation, I replaced both of my sensors. The immediate effect was that the Heep had a bit more pep and the mileage went up noticeably. That tells me my upstream sensor had failed, just not to the point that the PCM would complain about it. Changed at 135,000 miles.
Which makes you wonder just how bad do they have to be in order for the fault to show...
Changing it is an easy task, just keep oil away from the new sensors. The replacement part should come with approved anti-sieze on the threads. If you choose to add more, just make sure it is rated for O2 sensors or you risk damaging the things.