It's important to know where your gas shutoff valve is BEFORE an emergency. The gas meter is where you'll find the shut off valve - the meter is usually on the front or side of the house. If you smell gas or see a break call emergency services immediately. You can use a 12" crescent wrench or - I recommend getting a special gas shut off wrench that you store closer to the front door. If you're anything like me you probably have a garage full of tools - but can you imagine trying to sort through all of those if they're shaken all over the place in an earthquake? I have a designated gas shut off wrench that I keep stored by the front door so I can grab it quickly in an emergency.
If you know the gas is on, all you have to do is turn it 90 degrees in either direction to turn it off - but remember. You'll need the crescent wrench or the gas shut off wrench.