The length of time a germ remains infectious depends mostly on the type of germ it is. A germ can be either a virus or a bacteria, and each virus and bacteria has a different behavior in the environment. For example:
Quite a few common diseases seem to fall into the "several days to several weeks" category for survival time outside the human body.
- The smallpox virus is incredibly durable. The October 1999 issue of Discover magazine says, "A sample stored at room temperature may remain infectious for years". Anthrax is the same way. Fortunately smallpox has been eradicated and anthrax is not very infectious.
- The AIDS virus is fragile. According to this page, it is only viable for a few hours. Hepatitis B, on the other hand, may survive up to a week.
- Some diseases cannot survive outside the human body. Syphilis and gonorrhea share this trait and depend on intimate contact for transmission.
So the answer to your question is, "it depends on the disease that your son's friend is carrying." Fortunately your immune system is able to handle the vast majority of bacteria and viruses that your body encounters. Just about everything we touch is covered with germs. They have no effect on us because our immune systems deal with them. Also fortunate is the fact that simple hygiene steps -- like washing your hands thoroughly before eating -- can reduce the chance of infection significantly.
Here are several interesting articles: