Gas tanks are used to store a large amount of fuel to keep the car going, and were originally large drum-shaped pieces on the outside of the car. They often rust out from sitting too long, or can become punctured from damage. In later years they moved underneath the car and usually towards the rear. Today they tend to be more towards the center of the car for safety and aesthetic reasons. If tanks become ruptured they can leak fuel, at best wasting a lot of money and at worst starting a fire. Rust in the tank can affect the gas and plug fuel lines and pumps, possibly meaning that you will need to replace your entire fuel system. A new gas tank is also a must for a restoration, and a shiny tank can complete the look on your custom car. A simple visual inspection of the tank can often determine if it is time for it to be replaced.
Most gas tanks are made out of steel and are often treated with zinc coating or painted to help inhibit rust. Aftermarket tanks are sometimes made of stainless steel or chrome plated for show. Gas tanks are usually not designed for looks however, and are meant to be an out of the way part of the car. Tanks are designed to maximize space in tight areas under the car and often have odd or irregular shapes as they bend and twist around the frame and other parts of the car. Most tanks have a baffle inside them to prevent too much sloshing around while driving. The inside of the tank includes a sending unit and pump that is used to send fuel to the engine, as well as monitor the amount of gas left in the tank.
As with anything involving gasoline, use extreme caution when replacing a gas tank. Since it is underneath the car, it may be best to get an experienced mechanic to do the work.