Lead lines form due to the deposition of lead in the oral mucosa and gingival tissues. Lead accumulates in the extracellular matrix and binds to sulfhydryl groups in proteins, leading to the formation of a pigmented complex. These deposits can be observed histologically as a result of the interaction between lead and bacterial hydrogen sulfide.