CEPHALEXIN treats infections caused by bacteria. It belongs to a group of medications called cephalosporin antibiotics. It will not treat colds, the flu, or infections caused by viruses.