How are extrusive rocks formed?

A. Magma gets trapped inside Earth and cools to rock.
B. Volcanoes apply force to solid rocks and eject them
C. Magma gets forced to Earth’s surface and cools to rock.
D. Volcanoes trap lava inside Earth, where it cools to rock.