To drain... Turn off gas to water heater. Turn off water supply to water heater. Open drain at bottom of unit, attach garden hose to route water to drain or outside. Open TPR valve at top of unit, to allow air in. Water will come out now!
To flush... Once unit is empty, turn on water supply to unit, allow to flow through and out.
To refill... Close drain at bottom of unit. Close TPR at top of unit Turn on water supply to unit. Open a hot water faucet somewhere in your house, like in the kitchen. When water comes out there, the heater is filled. Turn on gas and relight pilot. Then, go around the house and purge each faucet for air and debris.