Fillings are used to repair a cavity in your tooth caused by decay. Your dentist will offer you the type of filling they consider clinically necessary.
The most common type of filling is dental amalgam, made from a mixture of different metals. Dental amalgam fillings are hard-wearing so are often used on your back teeth. If you need a filling for one of your front teeth, your dentist may suggest a tooth-coloured (white) filling.
Your dentist will offer you the type of filling most appropriate for your clinical (medical) needs. For example, if you need a filling for one of your front teeth, your dentist may suggest a tooth-coloured (white) filling, but the use of tooth-coloured fillings on back teeth is considered purely cosmetic.
There are a number of articles on the internet about the alleged toxic properties of amalgam. Although amalgam fillings can release low levels of mercury vapour, particularly when they are put in or removed, there is no evidence that exposure to mercury from amalgam fillings has any harmful effects on health.
Talk to your dentist if you have any concerns.