Cephalexin is an antibiotic that treats various bacterial infections such as pneumonia, other respiratory tract infections, ...
For example, beta-lactam antibiotics like penicillin or Keflex (cephalexin) block molecules from linking together, preventing the formation of a cell wall. This results in the cell membrane bursting.