Experts believe that the lunar highlands formed from magma. This theory is known as the lunar magma ocean hypothesis and is supported both by Apollo observations and images taken by the Japan Aerospace Exploration Agency.
The lunar highlands formed when magma erupted from below the moon's surface into a lava lake. As the lava cooled, large rocks floated to the surface to form both of the highlands.
The highlands are made up of three different types of rock: Ferroan Anorthosite Suite, Mg-Suite and Alkali Suite. The first type is the most common and oldest rock found on the moon's highlands, dating back 4.5 billion years. This is the rock that crystallized and formed in the magma, then later floated on top during the creation of the primary crust of the highlands.
Once the lava forming the highlands cooled, creating a Ferroan Anorthosite Suite igneous crust, it was hit over and over by meteorites. These impacts resulted in breccias, or fragments of rock melted together, that have a distinct elemental make-up. The highland crust and breccias underwent melting, impact bombardment and convection to form the Mg-Suite and Alkali Suite rocks. Granulites also eventually formed, which are highland rocks and meteorites that have been melted together.