Good hygiene is a good place to start. Clean hands, avoiding rubbing of the eyes, keeping the eyelids and lashes cleansed and scrubbed through regular hygiene is normally sufficient. At all costs avoid touching near an eye that is red and or has a discharge. You will almost certainly spread it to the other eye, as well as others around you. Colds are highly contagious, a common cause of pink eye, and spread to the eye in much the same manner as they do the upper respiratory tract - through close contact.
Colds represent viral eye infections, some of which are extremely contagious.
If symptoms are severe see an eye specialist who can diagnose severe viral eye infection. One, called EKC requires careful handling and quarantine of some sort it is so contagious. Usually, though symptoms are severe, no permanent eye damage occurs. Swimmers may find swimming goggles are necessary. Makeup should be discarded and replaced on a regular basis.