In the past, when teeth had cavities in them, they would be filled with a "silver" filling. These fillings required a substantial amount of tooth to be removed, prior to placing the filling. Over time, the filling would corrode, cause a possible fracture of the tooth, and eventually need replacement.
Nowadays, white fillings (more properly termed tooth-colored fillings) allow the dentist to fill a decayed tooth safely, while removing the least amount of tooth structure. The filling is bonded onto the tooth, that's why they are sometimes referred to as "bondings." They have a more esthetic look to them, versus the old silver fillings.
Before and after pictures of same teeth with silver and white fillings.
Teeth with silver
fillings

Same teeth with
white fillings