Bacteria and viruses are both types of microorganisms which can cause various types of infections and diseases in humans, plants, and animals. There are many differences between bacteria and viruses which help to differentiate the two and cause them to require different treatment options.
Bacteria are single-celled living microorganisms with many different varieties of species. Some are capable of withstanding extreme temperatures, pH's, and environments having a wide range of variability amongst bacteria as a whole. Some bacteria live inside humans in our intestines or respiratory tracts as a part of our normal flora. Normal flora is what is considered to be the average amounts and species of bacteria living in and on human bodies all the time and work in a symbiotic way with the human body. Some bacteria though can be pathogenic and cause the infection and diseases which many of us are familiar with, such as tuberculosis and strep throat. Bacterial infections can occur in various ways because different bacteria can cause infection by invading cells, being present on the body surface, or some can be infectious in either form.
Viruses are non-living microorganisms which are much smaller than bacteria. Viruses need to be inside of a human, plant, or animal cell to survive and then eventually replicate and cause infection. When viruses enter cells, they work by depositing their own genetic material, DNA or RNA, and using this to control that cell and cause it to produce more of the virus and spread it to other neighboring cells leading to an infection. Some examples of infections and diseases caused by viruses are the common cold, chicken pox, and Ebola.
These both require different treatment as a bacterial infection can often be treated by some antibiotics, but viruses would require the use of an antiviral. Both of these are used in their own ways to disrupt the replication of their specific microorganism which is causing the infection.