Carbapenems inhibit bacterial cell wall synthesis by binding to penicillin-binding proteins (PBPs), which are essential for cell wall construction. This results in bacterial cell death. Their broad-spectrum activity includes Gram-positive, Gram-negative, and anaerobic bacteria, making them versatile in treating various infections.