Bacteria and viruses differ in their structure. Bacteria have cell walls, lack organelles, and divide through binary fission. They can be gram-positive or gram-negative. Viruses are much smaller, lack cells, and contain genetic material surrounded by a protein coat. They invade host cells and use the cell's machinery to replicate. Microorganisms play important roles in decomposing organic matter and recycling carbon through the environment.