Assuming it’s a small leak, one that’s hard to smell, the first thing to do is turn off the gas to the unit. The requirement is that there must be a shut off valve within six feet of and in the same room as the gas appliance. Turn off the valve (a quarter turn on newer ones) and the gas is off.
Furnaces and water heaters generally have a valve on the piping beside them. Ovens and cook tops will have them in the cabinet below the units and a free standing stove will have it located behind it (you will have to pull out the stove).
Fireplaces will have a valve in the floor or wall close by that needs a removable key or if the fireplace is a prefab it may be behind a removable panel below the fireplace.
If it a pipe leak that is not in the area where those valves will shut off the gas to the leak, there is always a valve (that you will need a wrench to turn) on the incoming pipe to the gas meter.
Older homes may still have a gas meter inside the garage or basement, more often they will be outside against the house and on a rare occasion out in the yard. You should be familiar with the location of your main disconnects.
NOTE: If you smell gas in the house without much sniffing, shut off the gas immediately at the main disconnect, open as many windows as possible to vent the gas out, possibly evacuate the house and call a plumber. Your gas supplier (Centerpoint Energy in our area) does NOT repair any leak in the home.