Measurements of the inclusive and differential top quark pair ($\textrm{t}\bar{\textrm{t}}$) production cross section at centre-of-mass energies of 13 TeV and 5.02 TeV are presented, performed using CMS data collected in 2015 and 2016. The inclusive cross section is measured in the lepton+jets, dilepton and fully hadronic channels. Top quark pair differential cross sections are measured and are given as functions of various kinematic observables of (anti)top quark, the $\textrm{t}\bar{\textrm{t}}$ system, and of the jets and leptons in the final state. Furthermore, the multiplicity and kinematic distributions of the additional jets produced in $\textrm{t}\bar{\textrm{t}}$ events are also investigated and its modeling is compared for several generators. A new tune of parameters is developed for some of the generators. In addition, first measurements of top quark pair production with additional b quarks in the final state are presented. Furthermore, searches for four top quark production in CMS are also presented.