The igneous rocks come from a magma. They may have cooled slowly and deeply, then they are well crystallized (called crystalline rocks). Those are the plutonic rocks . Or they may also have flowed as lava on surface or have been ejected by an explosion and give so the volcanic rocks
The volcanic rocks occur - in lava flow (more liquid lava) or - in clusters, pitons or chimneys (more viscous lava), or - in deposits of ash or other larger products. Volcanic rocks crystallize faster than igneous rocks and often have less crystal size. Some too quickly solidified volcanic rocks have not crystallized at all and give glass (vitreous rocks). There are:
The lava flows are composed of basalts
Basalt
The basalt consists essentially of olivine and pyroxene . Olivine is a mixture of iron silicate $Fe_2SiO_4$ magnesium silicate $Mg_2SiO_4$ and manganese silicate $Mn_2SiO_4$. Pyroxene is a mixture of compounds of formula $XY(SiO_3)_2$, where $X$ is a big positive ion such as $Na^+, Ca^+, Li^+, Mg ^{2+},Fe^{2+}, Mn^{2+}$ and $Y$ a middle-sized positive ion like $Mg^{2+}, Fe^{2+}, Mn^{2+}, Fe^{3+}, Al^{3+}, Cr^{3+}, Ti^{4+}$
Olivine (green) and pyroxene (black)
Volcanic projections are formed of andesites
Andesite
The andesite consists essentially of feldspar Feldspars are silicates of aluminum (Al), potassium silicate (K), silicates of calcium (Ca) and sodium silicate (Na) formula $KAlSi_3O_8$ or $NaAlSi_3O_8$ $CaAl_2(Si_3O_8)_2$ .
Feldspar
Plutonic rocks are formed by slow crystallization and differentiation of a magma in magma chambers near the earth's surface. Depending on their melting point, various minerals successively crystallize.
The minerals rich in iron precipitate first and tend to go down because they are heavier than the remaining liquid: There is formation of a gabbro
Gabbro
The gabbros are composed of large crystals calcium feldspar $ CaAl_2(Si_3O_8)_2$ pyroxene olivine and quartz $SiO_2$.
The liquid is progressively enriched in silicon and aluminum and crystallizes slowly: There is formation of a granite
Granite
The granites are composed of large crystals feldspar $KAlSi_3O_8$ calcium feldspar $CaAl_2(Si_3O_8)_2$ quartz biotite $ K^+(Mg^{2+}, Fe^{2+}, Mn^{2+})_3[(OH^-F^-)_2|(Al^{3+},Fe^{3+},Ti^{3+})Si_3O_{10}]$
Biotite