If there is a plastic cap on the wheel's valve, unscrew it to remove it.
For a Presta valve, you also do two other things. Unscrew that nut at the base of the valve stem, as shown below, and remove it entirely. Then grab that pin at the tip of the valve, and twist it counterclockwise to free it.
Press down on the center of the valve's tip to release any remaining air.
Some bike tires fit loosely enough that you can just pull out the bead with your fingers, without using any levers. If that's impossible, insert a tire prying lever between the wheel's rim and the tire. Push it in far enough to hook under the tire's edge (bead).
Rotate the lever so that its free end reaches the wheel's spokes. This should lift the bead up and over the side of the rim. If the lever has a notch on that end, you can hook the lever to a spoke.
You might be able to insert a second lever right next to the first and slide it around the rim, forcing the tire bead out. If the tire is too tight to allow that, use a second tire lever to pry out the tire bead about 10cm (4 inches) away from the first lever; lock that lever to a spoke.
Use a third lever further along the rim. Then remove the second lever and use it still further along. You can continue around the wheel, alternately using the second and third levers to pry out sections. Eventually one side of the tire will be entirely outside the rim. Remove all levers from the wheel.
My road bike's tire beads are so tight that I've broken a plastic lever (shown below) and bent aluminum levers. I now use steel levers for that bike; that's unfortunate, because steel levers sometimes damage the rim as I pry the bead over it.
Now start pulling out the inner tube.
To fully remove the tube, you have to slide the valve through the rim's hole. First push the tire aside, as shown in the photo.
Check inside the tire for debris and perhaps the item which pierced the tube. Shake or blow out any debris, or grab it with your fingers. To do these things, you might prefer to first bring the other tire bead over that same side of the rim and remove the tire completely from the wheel.
If you have an extra tube, you can install it now. Later, at a convenient time, you can try to repair the leaking tube. Once repaired, it can be your spare tube that you carry in case of a future flat tire.
If you have no extra tube, you must now patch the leaking tube and reinstall it.