The trouble code by itself can't answer that question. The trouble code only tells you where to start diagnosing.
Some people, even some professionals, seem to prefer to just replace the O2 sensor, especially if the sensor has a lot of miles on it. If that doesn't fix the issue, then they will do the full diagnosis.
By the book, the first step with O2 sensor codes is to check fuel pressure.
Are there any other symptoms? Is running poorly? Do the condition of the exhaust and/or spark plugs indicate that the engine is running lean or rich? Is the code a CM code, or do you get it both CM and KOER (see my notes on pulling EEC-IV codes thread for an explanation of these acronyms)?