If you have a cavity you will need to get a dental filling to prevent further tooth deterioration. There are different types of fillings that vary in materials and appearance.
Composite fillings are most commonly used in today's dentistry. They are also called tooth-coloured or white fillings as they closely resemble your natural teeth colour, which makes them popular.
Amalgam material has been used in dentistry for the past 150 years however it's use is on the decline for couple of reasons. The main reason is that aesthetically it is not as appealing as white or tooth coloured filling. The second reason is that some patients becoming concerned with a small amount of mercury in amalgam fillings.