Chocolate agar is prepared by heating blood agar, which leads to the lysis of red blood cells. This process releases intracellular nutrients such as hemoglobin, hemin (factor X), and NAD (factor V), which are essential for the growth of certain bacteria. The heating process also inactivates inhibitors that could potentially hinder bacterial growth.