Grilling on a gas grill is a bit different from grilling on a charcoal grill. Heating temperatures are more even over the cooking surface, there is little smoke (unless you use wood chips wrapped in foil, or a smoker) and, naturally, no charcoal ash to clean up. However, there are many similarities as well, including the ability to use foil.
Gas grills come in a large variety of sizes and range from very simple grills to elaborate grills with side tables, warming trays, custom cookware, smokers, rotisseries and more. One feature, the ability to control temperature more easily, is one reason some like these grills better than charcoal grills.
Foil will help contain drippings and pieces of food (fish and shrimp, for example) from dropping into the grill. This means safer cooking (by avoiding accidental fires) and easier cleanup. It is also suitable for indirect heat cooking--for foods that will burn or get too tough if cooked too quickly, vegetables for example. If your gas grill does not have a smoker box attached to it, you may also be able to use foil for smoking--just place a few wood chips (that have been soaked a minimum of 30 minutes in water) in foil, securely wrapped (except for a few holes to let the smoke escape). Place it alongside your meats for a smoky flavor.
Use heavy duty foil, not the flimsy thin foil. The thinner foils easily fall apart and bits may fall down into the grill where they may not be easy to get out. Thin foil can also get stuck to food more easily. Thicker foil blocks more heat; this is important if you are cooking some items slowly.
The foil will get extremely hot. Do not touch it or try to remove it from the grill with your bare hands.
According to weber.com, "Caring for Your Gas Grill," you should never place foil in the bottom tray (they aim this advice toward Weber grills, but this applies to all gas grills of similar design). Too much grease can remain down there on the foil and become a potential fire hazard.
Although aluminum foil is considered safe to use for cooking on these grills, suitable use may vary from brand to brand. Make sure you read the instructions for your particular brand of grill first.