According to the Hadith about contagious disease, diseases can be contagious when they are caused by harmful microorganisms such as viruses, bacteria, or fungi that can be spread from person to person through direct or indirect contact. Contagious diseases can also be spread through the air, water, or food. To prevent the spread of contagious diseases, the Hadith recommends taking measures such as washing hands regularly, avoiding close contact with infected people, and maintaining good hygiene practices.