Heparin is a naturally occurring anticoagulant produced in the body and extracted commercially from pigs and cows. It prevents blood clot formation by enhancing natural clot dissolving mechanisms and catalyzing the inactivation of thrombin. Heparin is a mixture of sulfated polysaccharides made of repeating units of sugars including glucosamine, glucuronic acid, and iduronic acid. It exists in two forms: unfractionated heparin and low molecular weight heparin. Medically, heparin is used to prevent blood clots in conditions like heart attacks, atrial fibrillation, and blood clot-related lung and leg issues.