Which of the following correctly describes how igneous rocks are formed?

A. layers of sediment are pressed down on top of each other

B. melted rock cools, either above ground or underground

C. water breaks off pieces of rocks and moves them to new locations

D. another kind of rock is exposed to a lot of pressure and heat