Here's a problem to solve: When a volcano erupts, lava flows out from the top. What type of rock is formed as the lava cools?

Among the 4 following options, which is the correct answer?

- A: magma
 
- B: igneous
 
- C: sedimentary
 
- D: metamorphic
 