Summarize this article:

Locate the gas main valve near your main gas meter, usually found on the side of your building or in a cabinet inside. Turn the valve so it's perpendicular to the gas pipes to turn it off. Stopping your gas main should also stop your pilot lights. Keep all of your windows and doors open if possible so the gas inside your home can escape. That way, there is a less dangerous concentration in your home and it's not as likely to spark or explode. Even when your windows are open, you shouldn't stay in your home until the gas leak is fixed. Anything electric creates a spark that could ignite a high concentration of natural gas. Avoid turning on any switches, electronics, or gas appliances while you suspect a leak. Avoid using lighters or anything with an open flame. Don't search for a gas leak with a flashlight or any other light source. Evacuate your home as soon as you can once you've determined there's a gas leak. Go across the street and away from your home in case of an explosion. Once you're a safe distance away, contact the fire department and let them know there is a gas leak. Don't use a landline or mobile phone while you're still inside your house.
Turn off your gas line and pilot lights. Open the windows to vent your home. Don't use any appliances or electronics inside. Leave your home and call the fire department.