Efflux pumps function by utilizing energy, often derived from ATP hydrolysis or proton motive force, to transport unwanted or toxic compounds out of the bacterial cell. By doing so, they lower the intracellular concentration of antibiotics, rendering them less effective.