Dysphagia is the difficulty in swallowing, whereas odynophagia is when there is pain when swallowing. The two both deal with the esophagus and pharynx, but their implications in a differential diagnosis are much different.
Dysphagia is commonly found to be caused by achlasia, however, this is also a symptom of esophageal cancer and it must be investigated to rule out (especially age > 50). If dysphagia is only with solid foods, then it is likely either carcinoma (especially over age 50), peptic stricture (especially with heartburn), or lower esophageal ring. If dysphagia is with solid foods and liquids, then it is likely either diffuse esophageal spasm (DES), scleroderma, or achlasia.
Odynophagia can be caused by an infection, inflammation/ulceration, drugs, or even radiation. Candida, herpes, and CMV (immunocompromised) are the most frequent infection causes of dysphagia. Common culprits of drugs that can lead to odynophagia include quinidine, iron, vitamin c, antibiotics, and biphosphonates. Lastly, there can be allergic causes, such as eosinophillic esophagitis where eosinophils infiltrate the epithelium of the esophagus.