Bacitracin functions by interfering with the bacterial cell wall synthesis. It inhibits the dephosphorylation of bactoprenol, a lipid carrier that transports peptidoglycan units to the growing cell wall. This action results in bacterial lysis and eventual death, making it effective against Gram-positive bacteria.