The international Rosetta mission was launched in 2004 and consists of the orbiter spacecraft Rosetta and the lander Philae. The aim of the mission is to map the comet 67P/Churyumov–Gerasimenko by remote sensing, and to examine its environment in situ and its evolution in the inner Solar System. Rosetta was the first spacecraft to rendezvous with and orbit a comet, accompanying it as it passes through the inner Solar System, and to deploy a lander, Philae, and perform in situ science on the comet's surface. The primary goals of the mission were to: characterize the comet's nucleus; examine the chemical, mineralogical and isotopic composition of volatiles and refractories; examine the physical properties and interrelation of volatiles and refractories in a cometary nucleus; study the development of cometary activity and the processes in the surface layer of the nucleus and in the coma; detail the origin of comets, the relationship between cometary and interstellar material and the implications for the origin of the Solar System; and characterize asteroids 2867 Steins and 21 Lutetia. This paper presents a summary of mission operations and science, focusing on the Rosetta orbiter component of the mission during its comet phase, from early 2014 up to September 2016.This article is part of the themed issue ‘Cometary science after Rosetta’.