Foam cells are formed when macrophages engulf low-density lipoproteins (LDL) that have been oxidized. This process, known as phagocytosis, leads to the accumulation of lipids within the macrophages. The engulfed LDL is eventually transformed into lipid droplets, giving the cell its characteristic foamy appearance. The process involves several steps including receptor-mediated uptake, internalization, and intracellular processing of lipids.