Upon disturbance of the cells lining a blood vessel, a cascade of events leads up to the coagulation of the blood and restoration of a protective barrier between the tissue and the environment, preventing further bleeding (hemostasis). Blood turns from a liquid to a gel. Many aspects that cause coagulation also contribute to defence against pathogens. For example, as the blood clots, it traps bacteria. Some clotting components are also toxic to some bacteria.
Clotting begins with platelets forming a plug and initiating the release of clotting factors such as thromboplastin. This is a plasma protein which turns prothrombin to its active state, thrombin. Other clotting factors including calcium ions and vitamin K.
Thrombin recruits soluble fibrinogen and converts it into insoluble fibrin which covers the wound and contributes to the platelet plug by strengthening it and aiding against pathogens and bleeding.