Coagulation happens when the blood vessel wall becomes damaged. The normally fluid plasma changes from liquid to gel at the damaged area and forms a clot together with the cellular elements of blood, to prevent blood loss. As a first measure, the damaged endothelium (inner lining of the vessel) produces chemicals that mediate the adhesion of platelets to the damaged area. Then the platelets release chemicals that activate the plasma proteins taking part in coagulation. A multi-step reaction in the plasma results in one of the plasma proteins becoming water-insoluble, forming a cross-linked mesh. The cellular elements of blood get caught in the mesh, thus forming a clot. Underneath this clot the endothelium is able to regenerate. After this the clot gets broken down when np longer needed.
The blood of a healthy person fully clots in 5-6 minutes. If coagulation takes much longer than this, or doesn’t happen at all, we talk about hemophilia.