Lighting a pilot light for a gas hot water heater is not a difficult task. However, it can be irritating if you don't follow the instructions for your particular hot water heater.
You need to follow the sequence that is indicated and wait the prescribed amount of time before you attempt to light the pilot. If you don't the gas valve may not allow gas to go to the pilot light. If it doesn't light, you will not have hot water.
Not sure if the pilot light is your problem? See the article 'Troubleshooting Gas Water Heaters' for a complete listing of all the topics and links to resources for solutions.
Locating Water Heater Lighting Instructions
In the Owner's Manual
If you have the 'owner's manual' that came with your water heater, the lighting instructions for the pilot can be found there. Sometimes the manual is in a packet that is attached to the side of the water heater.
If you know the make and model number of your water heater, you can try and find the manual online.
On the Side of the Water Heater
Water heater pilot light instructions are found permanently fixed to the side of the tank. There are usually several steps, that involve waiting. These are meant for your safety in the event there is any unburnt gas left in the air.
The instructions for lighting a water heater pilot light are a little different for the various models. You will want to take the time to read them and make sure you understand the steps involved.
Pay particular attention to how long you have to wait. Additionally you want keep the button depressed the proper amount of time. Gas valves are fickle and they won't won't send gas to the pilot if you don't follow the instructions.
If you fail to get the pilot light lit the first try, you have to start over. The waiting periods will apply. These are safety precautions.
Lighting Instructions
For some pointers on how to light the pilot light, see the article 'Lighting a Water Heater Pilot Light' for instructions on using a utility lighter to light the pilot.
Some water heaters are equipped with igniters. If you have this type, see the article 'Using an Igniter to light a Pilot Light'.
Summary
Water heater gas valves are very tempemental, so you need to follow the instructions carefully when you attempt to light a pilot. Otherwise, you may be frustrated, when the pilot light won't light. Do not assume that you have another problem with your water heater unless you have followed the lighting instructions carefully.
If you still cannot get it to light, it could be a problem with your 'thermocouple' or the 'gas valve', follow these links for more information.