Let the fireplace cool down completely so that you can safely handle the grates.
Place some newspaper or a tarp on the floor in front of the fireplace to protect the floor from soot and ash.
Put on gloves to protect your hands from ash and soot.
Open the fireplace doors or screen and take out any wood that remains in the fireplace. Remove excess ash as well.
Examine the base of the grate and see if it's bolted into the fireplace floor. Most are not. If your grate is, use a wrench or screwdriver to remove the bolts or screws holding it in place.
Grasp the grate with your hands at the side and lift the grate up and out of the fireplace slowly, making sure not to hit the doors on the way out.
Place the grate on the newspaper.