Black holes as massive as several billion solar masses appeared within a billion years after the Big Bang. The origin of these objects remains a mystery. I will present three competing state-of-the art ideas on how such massive black holes may have formed in the early universe from stellar black hole remnants, via rapid gas accretion, or via successive mergers. I will then discuss the role of
circumbinary gas in mergers between black holes: for facilitating (or not) the early shrinking of their orbit, producing unique observational signatures, and impacting low-frequency gravitational wave emission. Upcoming observations with the recently launched James Webb Space Telescope (JWST) and with the space-based Laser Interferometer Space Antenna (LISA) will help us understand the origin of massive black holes, including the details of their mergers.