Rocks are composed of more than one mineral, while minerals are pure substances composed of the same material. There are three main types of rocks: sedimentary rocks which are formed from compressed layers of other materials; igneous rocks which form when lava cools; and metamorphic rocks which are existing rocks that are altered by heat and pressure. Minerals have distinct crystal structures and chemical compositions, and can be elements, sulfates, or oxides containing metals and oxygen. Common rocks and minerals are used for construction materials, electronics, jewelry, and other applications depending on their properties.