Once a tooth has formed decay the destruction will become progressive. As the decay and the bacteria within the tooth reaches the nerve, nerve destruction and death results accompanied by possible pain, swelling and infection. To prevent this from happening the dentist wants  to remove the decay in the early stages, and fill the cavity left after decay removal to restore tooth anatomy into its natural form. 

There are many filling materials present on the market today. The main ones are:  

    Amalgam: These are also called silver fillings. It is formed by mixing a metal alloy powder with mercury. The mixture then takes on a doughy consistency that the dentist places in the tooth and then carves back to the anatomic shape of the tooth. Amalgam is a metal alloy, like most metals it will undergo shrinkage and expansion as heat or cold is applied to it in foods or drinks. The volumetric changes are small but are enough to allow the filling to sheer off the walls resulting in micro-leakage where saliva, food particles and bacteria can seep under the filling and start a new decay, known as secondary decay. 
    Composite: This is a white, tooth colored, filling with different shades to match your tooth color. It is not as strong as a metal filling, but it is very esthetic. Composite is  used for anterior teeth and small fillings. It is possible to bond composite filling to both the Enamel and Dentin. Modern composite comes in the form of a paste filled with glass particles which undergo a polymerization reaction to harden up when subjected to form of UV-light (light cured). Ultra violet light acts as the initiator of the hardening process. Composites are resin based materials with inorganic filler particles. They are fixed to tooth structure using an etch technique and bonding agents developed for that purpose.
    Gold: One of the oldest filling materials with no apparent side effects. It was used in a pure form in the teeth of the Egyptian mummies. Today's gold is an alloy of various metals.
    Porcelain: The porcelain inlay can be made to mimic tooth color. It has a very smooth surface once it has been heated in the oven and glazed. While the esthetics are quite an advantage, the associated problem with porcelain fillings is their ability to easily break under stress. These inlays are bonded to the tooth using composite resins and bonding agents.