The standard model (SM) production of four top quarks (tt over bar tt over ba in proton-proton collisions is studied by the CMS Collaboration. The data sample, collected during the 2016-2018 data taking of the LHC, corresponds to an integrated luminosity of 137fb-1 at a center-of-mass energy of 13TeV. The events are required to contain two same-sign charged leptons (electrons or muons) or at least three leptons, and jets. The observed and expected significances for the tt over bar tt over bar signal are respectively 2.6 and 2.7 standard deviations, and the tt over bar tt over bar cross section is measured to be 12.6-5.2+5.8fb. The results are used to constrain the Yukawa coupling of the top quark to the Higgs boson, yielding a limit of < 1. 7 is the SM value of yt. They are also used to constrain the oblique parameter of the Higgs boson in an effective field theory framework, H. Limits are set on the production of a heavy scalar or pseudoscalar boson in Type-II two-Higgs-doublet and simplified dark matter models, with exclusion limits reaching 350-470GeV and 350-550GeV for scalar and pseudoscalar bosons, respectively. Upper bounds are also set on couplings of the top quark to new light particles.