It depends on the age of the stove. If it's really old, you light it with a match. Turn the knob so gas is flowing out and stick a match near the burner. Do it quickly as the longer you wait the more unburned gas will come out. More likely you have an electric ignition. You turn the knob to "light" or "lite" and you'll hear a clicking noise. This is an electrical spark being created to light the gas. The gas will start flowing and will be automatically lit by the electric spark. Once it's lit turn the knob to stop the sparking/clicking and set the flame you want.
It can be dangerous to have the gas flowing and no flame. The gas slowly fills the room and if there's a spark from anything, like plugging in an outlet, or even static electricity can set it off. That's how you get explosions. The only ways to avoid this are to have the stove completely off or to be sure there's a flame if the gas is running. If the gas is running without a flame, you will smell it. If you think it's been running awhile, open the windows and don't light any matches. If it's really strong, or you smell it for no reason like when you just wake up in the morning, call the fire department.
The gas line to the stove should have an accessible valve on it so you can turn off the gas at that point as well.
One of the good things about gas stoves is you can cook on them even when there's no power. Just turn on the gas and stick a match near the burner and the flame should come on, even in a stove with an electric ignition.
Lastly, if you're going to be in earthquake country, make sure you know how to turn off the gas for the entire house. A lot of post-earthquake damage is been done with houses catching fire due to damaged gas lines which were leaking.
ETA: In re-reading this it all sounds so dangerous. It's not. The key thing to remember is gas with no flame for more than a few minutes is bad. Otherwise, you'll probably love it. I love my gas stove and would have a hard time going back to electric. It has seriously superior temperature control.