Oesophageal cancer is the sixth most common cause of cancer-related death worldwide and is therefore a major global health challenge. The two major subtypes of oesophageal cancer are oesophageal squamous cell carcinoma (OSCC) and oesophageal adenocarcinoma (OAC), which are epidemiologically and biologically distinct. OSCC accounts for 90% of all cases of oesophageal cancer globally and is highly prevalent in the East, East Africa and South America. OAC is more common in developed countries than in developing countries. Preneoplastic lesions are identifiable for both OSCC and OAC; these are frequently amenable to endoscopic ablative therapies. Most patients with oesophageal cancer require extensive treatment, including chemotherapy, chemoradiotherapy and/or surgical resection. Patients with advanced or metastatic oesophageal cancer are treated with palliative chemotherapy; those who are human epidermal growth factor receptor 2 (HER2)-positive may also benefit from trastuzumab treatment. Immuno-oncology therapies have also shown promising early results in OSCC and OAC. In this Primer, we review state-of-the-art knowledge on the biology and treatment of oesophageal cancer, including screening, endoscopic ablative therapies and emerging molecular targets, and we discuss best practices in chemotherapy, chemoradiotherapy, surgery and the maintenance of patient quality of life.