Bacteria can thrive in many types of environments. Most bacteria causes no harm but there exceptions like Strep throat, Tuberculosis, urinary tract infections, food poisoning, and a few more.
Viruses are smaller than bacteria and require a living host such as animals, plants, and humans to multiply and survive. When a virus enters your body it invades some of your cells and redirects it to produce the virus. Some examples of viral deceases are Chickenpox, AIDS, and Common colds to name a few.
Sometimes it can be hard to know whether a bacteria or virus is causing your symptoms as some things like pneumonia, meningitis, and diarrhea can be caused by either bacteria or virus.