Minerals are entirely inorganic solid chemical substances. Minerals are made of a specific chemical composition. The composition of minerals can vary from very simple to very complex. Quartz is a mineral that is produced in igneous rock or sandstone. Quartz has a specific pure chemical composition that defines it.
Rocks are composed of one or more minerals. Minerals are the components that rocks are made of.
Most minerals are formed when intense pressure and heat compresses rock into a dense crystalline structure.