Cause of cold sores

What is the cause of a cold sore and how can it be treated?