The formation of casts begins with the precipitation of Tamm-Horsfall mucoprotein, which is secreted by renal tubular cells. Under certain conditions, this protein can agglomerate and form a matrix that captures cells, cellular debris, or other substances present in the tubular lumen. Low urinary flow, acidic pH, and high solute concentration are favorable conditions for cast formation.