Sludge is formed from particles of dirt, decay, and iron oxide that detach from various components within the heating system and gradually accumulate over time.