Contagious refers to diseases spread through physical contact.
- If you deal with contagious diseases, disinfect your hands well.
Infectious refers to diseases spread through air, water, etc.
- We are exposed to chemicals and infectious diseases.
Note: In figurative use, these words can be synonymous.
- Her optimistic and humorous mood is infectious (or contagious).