Detailed Instructions: Given a question and a context passage, generate the answer having the word or phrase from the context passage. Here, the answer should be a shortest continous span from the passage.
Problem:Context: All rocks on Earth change, but these changes usually happen very slowly. Some changes happen below Earths surface. Some changes happen above ground. These changes are all part of the rock cycle. The rock cycle describes each of the main types of rocks, how they form and how they change. Figure 4.1 shows how the three main rock types are related to each other. The arrows within the circle show how one type of rock may change to rock of another type. For example, igneous rock may break down into small pieces of sediment and become sedimentary rock. Igneous rock may be buried within the Earth and become metamorphic rock. Igneous rock may also change back to molten material and re-cool into a new igneous rock. Rocks are made of minerals. The minerals may be so tiny that you can only see them with a microscope. The minerals may be really large. A rock may be made of only one type of mineral. More often rocks are made of a mixture of different minerals. Rocks are named for the combinations of minerals they are made of and the ways those minerals came together. Remember that different minerals form under different environmental conditions. So the minerals in a rock contain clues about the conditions in which the rock formed (Figure 4.2). Geologists group rocks based on how they were formed. The three main kinds of rocks are: 1. Igneous rocks form when magma cools below Earths surface or lava cools at the surface (Figure 4.3). 2. Sedimentary rocks form when sediments are compacted and cemented together (Figure 4.4). These sediments may be gravel, sand, silt or clay. Sedimentary rocks often have pieces of other rocks in them. Some sedimentary rocks form the solid minerals left behind after a liquid evaporates. 3. Metamorphic rocks form when an existing rock is changed by heat or pressure. The minerals in the rock change but do not melt (Figure 4.5). The rock experiences these changes within the Earth. Rocks can be changed from one type to another, and the rock cycle describes how this happens. Any type of rock can change and become a new type of rock. Magma can cool and crystallize. Existing rocks can be weathered and eroded to form sediments. Rock can change by heat or pressure deep in Earths crust. There are three main processes that can change rock: Cooling and forming crystals. Deep within the Earth, temperatures can get hot enough to melt rock. This molten material is called magma. As it cools, crystals grow, forming an igneous rock. The crystals will grow larger if the magma cools slowly, as it does if it remains deep within the Earth. If the magma cools quickly, the crystals will be very small. Weathering and erosion. Water, wind, ice, and even plants and animals all act to wear down rocks. Over time they can break larger rocks into smaller pieces called sediments. Moving water, wind, and glaciers then carry these pieces from one place to another. The sediments are eventually dropped, or deposited, somewhere. The sediments may then be compacted and cemented together. This forms a sedimentary rock. This whole process can take hundreds or thousands of years. Metamorphism. This long word means to change form. A rock undergoes metamorphism if it is exposed to extreme heat and pressure within the crust. With metamorphism, the rock does not melt all the way. The rock changes due to heat and pressure. A metamorphic rock may have a new mineral composition and/or texture. An interactive rock cycle diagram can be found here: The rock cycle really has no beginning or end. It just continues. The processes involved in the rock cycle take place over hundreds, thousands, or even millions of years. Even though for us rocks are solid and unchanging, they slowly change all the time. 
 Question: type of rock that forms when magma or lava cools
Solution:
igneous rock