Granite formed in a number of different situations. Some granite was generated in zones of rifted continental or oceanic crust, but most granite was generated in zones of collision between continents and oceanic crust, and where continents were amalgamated.
Granite formed by two different processes: by fractional crystallization of basaltic magma; and by melting older continental crust. Between these end members, there is a spectrum of hybrid processes, including mixing of basaltic and granitic magmas, and contamination of basaltic magma by partial melts of different kinds of continental crust
A granite containing both muscovite and biotite micas is called a binary or two-mica granite. Two-mica granites are typically high in potassium and low in plagioclase, and are usually S-type granites or A-type granites.
Granite has a felsic composition and is more common in recent geologic time in contrast to Earth's ultramafic ancient igneous history. Felsic rocks are less dense than mafic and ultramafic rocks, and thus they tend to escape subduction, whereas basaltic or gabbroic rocks tend to sink into the mantle beneath the granitic rocks of the continental cratons. Therefore, granitic rocks form the basement of all land continents.
