There are a few ways to do this-
Avoid contact with people who have disease.
Wash hands/ keep clean and sanitary- this is obvious.
Medication (of course)
Diet and nutritional food can help you stay well.
Public bathrooms and restaurants can carry diseases just from others being in them.
So line the toilet with paper before use and make sure silverware and cups have been washed before use.
Etc.... there are many other ways this is just a list