Is there anyway to prevent yourself from getting a head cold?

A few practical item. Handwashing is the best method. Avoid ill contacts. Don't put your hand in your mouth or eyes.
No. If you are exposed to the virus you are unlikely to be able to prevent getting the head cold, but can minimize your exposure by not touching people or being around people with colds, washing your hands if you have touched them or surfaces which may have had the virus deposited on them, although most viruses die fairly quickly on inanimate objects.