Remove the bolts on either side of the toilet, then gently remove it and lay it on the side. If there is not enough space, place it on a towel elsewhere. Take care as to ensure you do not accidentally scratch anything.
I used a monkey wrench to remove one of my bolts as they were held in place by excessive wax, but generally you should be able to remove them by hand.
Once you have put back on the gasket, line up the toilet over the bolts, then slowly lower it down until both bolts clear their respective holes. Set it down and ensure the toilet is level and straight.
Clean up the area, and reconnect the waterline. Once connected, turn back on the valve.
If water leaks out, the toilet is not positioned properly and needs to be readjusted. Restart from step 7, after undoing the bolts and lifting the toilet back up.
If there are no leaks, reconnect the waterline and clean up any excess wax. Congratulations, you have successfully replaced your toilet flange!