Yosemite Valley and Yosemite National Park contain incredible exposures of the magma chambers that once fed eruptions of volcanoes that topped the Ancestral Sierra Nevada, the mountain edifice that graced the Cretaceous landscape of California and western Nevada (now, when is the last time you heard Yosemite introduced that way?).
As a glacially carved valley (ignoring for the moment the work of rivers and mass wasting), Yosemite doesn't really fit the stereotype of a U-shaped valley. It has a very flat valley floor, and instead of a relatively linear valley, it has many reentrants and coves. This in large part is responsible for the unique scenery of this beautiful place. The flat floor exists because lake sediments filled the trough in the area upstream of some of the valley moraines. The walls vary, because more than one kind of granitic rock is present, and in fact at least eleven intrusions are defined in the area (see the map at http://virtual.yosemite.cc.ca.us/ghayes/geology.htm).
Ironically, the rocks are not all that easily observed up close. The cliff base is often covered with loose and unstable talus, and many of the accessible exposures are covered with lichens. Hetch Hetchy Valley is often a better bet, having been more recently scoured by glacial ice (see my very first picture post: Photo of the Day).
A slide in 1982 brought down huge boulders of the El Capitan granite, one of which is pictured above. The photo shows a large number of darker colored enclaves*, blobs of dark rock that probably originated as two different intruding magmas mixed. The enclaves can perhaps be thought of as globules of oil floating in the vinegar of Italian salad dressing.
*Enclave: Body of external origin in an igneous rock. The main varieties are xenoliths (fragments of solid rocks) and microgranitoid enclaves (former magma globules derived by mingling of magmas).
Vernon, R.H., 2004, A Practical Guide to Rock Microstructure, Cambridge University Press