Wash hands and wear a surgical mask and you reduce your chances of contracting the cold virus. Also, never touch your eyes with your hands. Rubbing virus directly into your eyes lets it walk right in the front door.
Washing hands frequently and not touching your eyes--both key. Also getting enough sleep and eating right, to keep up your natural defenses. I heard once that there are at least 200 different cold viruses. Maybe you build immunity to each one you get a cold from, so it just takes time.