Igneous rocks, which make up most of the continental and oceanic rocks, are formed when magma cools and solidifies, resulting in two possibilities: plutonic rocks and volcanic rocks.
When the process occurs in the depths of the Earth, we refer to plutonic rocks, also called "intrusive rocks". When it occurs at the surface of the planet, we speak of volcanic rocks, also called "extrusive rocks" or "effusive rocks".
The commonest igneous rocks are granite (plutonic rock) and basalt (volcanic rock). The former represents 95 % of plutonic rocks and the latter represents 90 % of volcanic rocks.
Here we see a piece of gabbro, a plutonic rock, trapped in granite; this is called a xenolite. This rock comes from the east of the Sierra Nevada, Rock Creek Canyon, in California. © wikipedia-Mark A. Wilson