How do you stop the water so you can replace that part of the PVC pipe that goes to the bottom drain of an inground pool?

it all depends on where the pipe is. Sometimes you can just plug the hole in the pool with a rubber stopper.

without knowing wher your pipe is or what kind of pool you have, how much water, how many drains. etc.. this question may be too vague to answer

If the line to the bottom drain is dedicated (a line directly to the bottom drain only), and it is the suction line as you describe, you will have to partially drain the pool,

If only one suction pipe goes into the pump, the bottom drain runs through the skimmer. Plug the skimmer in the hole FARTHEST FROM THE POOL with a threaded 2" or 1 1/2" cap (whatever size your plumbing is).

You'll also need to pull all of the eyeballs/returns and plug them in the same fashion (pressure side). There are rubber plugs made for all of this, too. If you have a pool cleaner you may have to plug it or close the cap also.

A side note, because there's no details about your pool: if you have a 2nd line to the pool and a plug-in cleaner with a hose (like a Navigator or a Barracuda) your dedicated line is for the cleaner. Plug that also and you won't have to drain it. But if you have water features, a spa, play pool, if they run into one pump, boosters, etc. then my advice may not apply.

Dan the Poolman Phoenix