Heparin is a naturally occurring glycosaminoglycan that inhibits blood clotting by activating antithrombin III, which in turn inactivates thrombin and other clotting factors. It is available in two main forms: unfractionated heparin (UFH) and low-molecular-weight heparin (LMWH).