Eye infections can be bacterial, viral, or fungal. You can get infections from 2 "paths". Either internally from viruses that lay dormant in your nerves such as (freaky i know!), like herpes, or after an injury from the outside environment. People that wear contact lenses are more likely to get an infection actually. But this is when they don't do the right thing, and not follow instructions. Some contact lenses are only meant to be worn for small periods of time, eg coloured contact lenses or normal daily contact lenses. You shouldn't sleep with these in your eyes overnight! Anywho the internal herpetic infections are handled, but can always pop up again. The external ones are often handled by the eye with minimal drama. White blood cells come into the eye, gobble up (phagocytose) the virus or infected cells, and your bodies cells start re-building any damage.So, to summarise. Most eye infections resolve with minimal or no treatment. Some infections are more difficult than others for your body to deal with. AND, you should see a doctor if your eyes hurt for any reason.