Turn the shutoff valve's handle clockwise as much as you can by hand, then flush the toilet once to drain the water from the tank. Use a wrench to undo the connecting nut where the water supply line connects to the shutoff valve.
Pull off the plastic caps on either side of the toilet's base. Use a wrench to remove the nuts from the closet bolts, then pull the toilet up and off the bolts.
Scrape off the remains of the wax ring from the toilet flange using a putty knife. Clean off the wax residue from the flange using a rag and mineral spirits.
Back out the old mounting screws from the flange using a screwdriver, then drive in new screws using the screwdriver. If the screw holes in the floor are stripped, spin the flange and mark the new locations of the mounting screws on the floor using a pen.
Remove the flange from the floor and drill guide holes where you made the pen marks. Place the flange on the floor and line the screw holes in the flange with the guide holes in the floor, then drive the new screws into the floor.
Press the rounded side of the new wax ring onto the bottom of the toilet, then lower the toilet over the flange. Tighten the nuts on the closet bolts, then sit on the toilet for five minutes and tighten the nuts again. Replace the plastic caps and bolt the water line back onto the shutoff valve, then turn the valve handle counterclockwise.