The primary function of capillaries is to facilitate the exchange of gases, nutrients, and waste products. Oxygen and nutrients from the blood pass through the capillary walls to the surrounding tissues, while carbon dioxide and metabolic waste move from the tissues into the blood.