Canker sores (aphthous ulcers) are painful sores in the mouth which can result from trauma, irritation, stress, allergies, medications, heartburn, acidic foods, ingredients in toothpaste, immune system problems, and other causes. They are not contagious and typically go away in 10-14 days. Other than treating the pain or perhaps using certain lozenges, there is not much that can be done to shorten the duration of the sore. In very serious cases, certain medications may be prescribed. Cold sores (herpes simplex virus) may appear similar to canker sores and usually go away in less than two weeks. Unlike canker sores, cold sores can be contagious. There can be common causes that the two share and medication can be used at the very beginning of a cold sore outbreak in order to prevent the sore. Once the sore is present, these medications typically do not significantly shorten the duration or severity of the sore.