ANDY'S ANSWER: Cold sores are caused by the herpes simplex virus. The herpes simplex virus is very common because it is so easily spread. Some people have been infected by their own parents at a young age, by being kissed by them or by sharing eating utensils, cups, etc. with them. Once you have the virus, there is no way to get rid of it from your body - it stays with you for life. The only thing you can do is try to minimize your outbreaks (which can be very painful) and try not to infect other people.
Sun is one of the triggers that can stimulate an outbreak. Always wear sunscreen and a lip balm when out in the sun or even in the cold. Stress or letting your body get run down is another thing that can cause cold sores to break out. Sometimes menstruation or other hormonal changes can trigger an outbreak, so it could be pretty hard to avoid them altogether. Eat a healthy diet, get enough rest and don't share personal items with others to reduce the risk of triggering the virus. If you do get a cold sore, expecially avoid kissing others or touching the cold sore as it is very easy to spread.