The vast majority of Yosemite is comprised of plutonic igneous rocks. Plutonic rocks forms deep underground when molten rock cools and solidifies very slowly, allowing large crystals to form. In contrast, volcanic igneous rocks form at the surface when molten rock cools and solidifies quickly, resulting in small crystals. Granite, granodiorite, tonalite, quartz monzonite, and quartz monzodiorite are all forms of plutonic rock that are found in Yosemite, and are loosely referred to as granitic rocks. Quartz diorite, diorite and gabbro are plutonic rocks found in Yosemite, but are not technically considered to be granitic rocks. Plutonic rocks are primarily comprised of 5 minerals: quartz, potassium feldspar, plagioclase feldspar, biotite, and hornblende. Plutonic rocks, including granitic rocks, differ primarily in the relative proportions of quartz and feldspar, although texture is also an important consideration. The plutonic rocks were generally formed during the Cretaceous period.
The different individual bodies of plutonic rocks in Yosemite were formed from repeated intrusions of magma into older host rocks beneath the surface of the Earth. These intrusions may have taken over a time period as long as 130 million years. These plutonic rocks, formerly deep within the Earth, are now exposed at the surface, owing to deep erosion and removal of the formerly overlying rocks.
Volcanic igneous rocks are erupted onto the Earth's surface and cool/solidify much more quickly that plutonic igneous rocks. There are small amounts of volcanic igneous rocks within Yosemite and large amounts east of the Sierra Nevada Crest. The volcanic rocks inside the park include basalt flows, latite tuff, and latite lava flows. The volcanic rocks outside the park include these same rocks as well as ash-flow tuff, rhyolite, pumice, obsidian, etc. The Mono Craters, east and southeast of the park, are volcanoes that erupted 3,000 to 550 years before present. The Inyo Craters, southeast of the park, are volcanoes that erupted 40,000 to 3,000 years before present. Cathedral Peak Granodiorite from near Fairview Dome. The white blocky structures are "potassium feldspar phenocrysts (crystals). Note the U.S. penny just to the right of middle; it is used for scale.
Metamorphic rocks are sedimentary or volcanic rocks that have been changed, or "metamorphosed", due to the temperature, pressure, and shearing stress that can result from being buried in the Earth's crust. There are two northwest-trending belts of metamorphic rocks, one on each side of the batholith of plutonic rocks that is the core of the Sierra Nevada range - these belts existed before the creation of the batholith and its subsequent exposure. Metamorphic rocks of volcanic origin are called metavolcanic rocks, and metamorphic rocks of sedimentary origin are called metasedimentary rocks. (Huber, 1989)