Plutonic Intrusions
The process begins with a massive upwelling of liquid magma from the Earth's mantle up into the crust. If this upwelling reaches the surface, it will form a volcanic eruption. In this case, it instead becomes trapped in the rock below the surface. The result is a trapped pocket of liquid magma surrounded by cooler rock. This pocket is known as a plutonic intrusion, or pluton. The magma very slowly begins to solidify as its heat radiates out into the surrounding stone.
Differential Cooling
The magma consists of a complex soup of various liquefied minerals. Some of these minerals solidify more quickly than others as they cool, due to their higher melting points. Since the cooling process is very slow, the minerals which remain liquid are squeezed out of the rock matrix rather than being trapped inside it as bubbles or impurities. Eventually, the minerals with the lowest melting points are squeezed into nearly-pure pockets of liquid material in odd corners and vents. Over tens or hundreds of millions of years, these finally solidify as well.
Chemical Composition
Aquamarine is composed of beryllium, aluminum, and silicone. Due to their similar melting points and flow properties, they solidify at roughly the same time, after most of the other minerals in their deposit have reverted to solid rock. They spend long periods of time under tremendous heat and pressure and eventually mix and cool into transparent beryl. A slight iron impurity of one to two percent gives the beryl the trademark blue tint that identifies it as an aquamarine.
Exposure
Aquamarine reaches the surface when the pluton which created it is exposed by erosion and geological processes. Aquamarine is usually found in deposits of granite, an extremely hard rock that erodes slowly. Since the granite is usually surrounded by softer stone, it is exposed as an outcrop while the ground around it is weathered away. Once it is part of a ridge or mountain, the pluton is vulnerable to exploitation by miners seeking gems.