Minerals are chemical compositions while rocks are mixtures of different minerals. For example mineral olivine consists of magnesium ( #Mg# ) and (or) iron ( #Fe# ) atoms and one orthosilicate group ( #SiO_4# ). It has its unique chemical and physical properties. But with the other minerals it can compose the rocks. Peridotite is an igneous rock which is consists mostly of olivine and some pyroxene (another mineral which has its own chemical composition different from olivine). Well- known basalt (igneous rock) as well as peridotite contains some olivine but much less. Basalt also consists of amphibole, pyroxene, plagioclase and feldspar.
I hope I could explain clearly. Anyway feel free to ask questions :)