Both bacterial and viral infections are contagious. Both bacteria and viruses are microorganisms that are usually found everywhere in normal life and can be transmitted through the respiratory or digestive tracts. Bacterial infections can cause many diseases such as pneumonia, gastritis, sepsis, and viral infections can cause diseases such as viral hepatitis, chicken pox, polio, rubella, etc. Patients who have bacterial or viral infections must be careful to avoid excessive contact with them. If there is an infection, you should go to the hospital for a detailed examination, and under the guidance of the doctor reasonable medication for symptomatic treatment, you can also apply drugs that increase immunity to enhance resistance, most will be cured quickly. Usually, you should drink more water, eat more fresh fruits and vegetables, remember to wear a mask when you go out, wash your hands regularly at home, and protect yourself in general to reduce the possibility of infection.