Which kind of rock is formed when lava leaves a volcano and cools?

A. sedimentary
B. metamorphic
C. conglomerate
D. igneous

D. igneous