How Long Is a Cold Contagious?
A cold is most contagious at days two and three of the onset of a cold and usually not contagious by day seven.
(Source: National Institute of Health)
More Info: You can become infected by a cold if you are exposed to nasal secretions infected with a cold virus through a sneeze or cough. You can also become infected by coming in contact with objects that have been touched by an infected person if you then touch your mouth, eyes, or nose.
How to Prevent a Cold
The best way to avoid a cold is to wash your hands vigilantly. If you can't get to a sink, be aware of where your hands have been and avoid eating anything with your hands such as a sandwich, or touching your face until you can use hand sanitizer or wash them.
The cold virus is unstable in the environment, but will still live a few hours on environmental surfaces that an infected person has touched. The virus is easy to inactive with simple soap and water, so it's important to avoid spreading the virus by cleaning and disinfecting surfaces like the telephone, sink handles, door handles, and such.
Since the virus can live on environmental surfaces that have become infected, use disposable items when possible such as paper towels rather than hand towels or sponges.