What is the function of an anticoagulant?

An anticoagulant is a type of medication that is used to prevent the blood from clotting.