An igneous rock is any crystalline or glassy rock that forms from cooling of a magma. A magma consists mostly of liquid rock matter, but may contain crystals of various minerals, and may contain a gas phase that may be dissolved in the liquid or may be present as a separate gas phase.