Cefalexin is an antibiotic belonging to the cephalosporin family. It's used to treat infections caused by bacteria, such as infections of the urinary tract, skin or chest. It can also be used for dental infections or ear infections.
It works by killing or stopping the growth of bacteria (bugs) which gets rid of the infection.
Cefalexin is sometimes used to prevent infections. It doesn't work against infections caused by viruses.