When the decay has destroyed less than about 50% of the chewing or biting surface of the tooth, we can usually place a "filling".
For many years, mercury/silver amalgam filling materials have been the standard filling material for back teeth.
Tooth colored plastic filling materials are as good as or better than amalgam by all measures. Tooth colored fillings look better, are bonded to the tooth structure so they provide a measure of support and strength for the restored tooth and last about as long.
Tooth colored fillings are often smaller and more conservative than silver fillings. This help preserve good tooth structure. The downsides to tooth colored fillings are greater skill level and slightly longer time needed for placement and a higher cost due to materials and time factors.
You can expect tooth colored filling to cost 25-50% more than a comparable mercury/silver filling.