There are two types of basic filling;
Composite fillings are white, and come in several shades to match your tooth colour. They are hard immediately after treatment so you don't need to wait to eat on them.
Amalgam fillings are a mixture of several materials including silver and mercury. Modern amalgam contains more silver than it used to, and the material takes an hour or two to harden properly. However, depending on which tooth it is placed in and the amount of tooth left after decay has been removed, it has certain advantages over composite material. Despite what you might have heard, there is no evidence to suggest that they can somehow 'leak' mercury- it is safely and thoroughly bound to the silver and stays that way even if swallowed.