Bacteria are single-celled organisms that reproduce by cell division, while viruses are not cells and are incapable of reproducing on their own. Viruses must invade other cells and use the cells' machinery to reproduce their own genetic material.
Bacteria are prokaryotic cells; their DNA is not contained within a nucleus. Bacteria are among the oldest life forms on Earth, with fossils dating back billions of years. Not all bacteria are harmful, and most are not. Some bacteria are photosynthetic and are responsible for contributing the majority of the Earth's oxygen. Other bacteria are extremophiles and exist in habitats unsuitable to most other forms of life. Still other bacteria are necessary to human survival and exist naturally in human digestive systems. Among bacteria that are harmful, the Mayo Clinic points out diseases such as tuberculosis, urinary tract infections and strep throat as having bacterial causes.
Viruses are much smaller than bacteria, and many scientists do not consider them to be alive. Viruses are not cells; they exist as nothing more than DNA or RNA enclosed in a protein coat. Viruses must inject their genetic material into host cells in order to reproduce. This hijacks the machinery of the host cell, turning it into a virus-producing factory. Unlike bacteria, nearly all viruses are harmful. The Mayo Clinic points to AIDS, chickenpox and the common cold as examples of viral diseases.