Final answer:
Olivine is typically found in igneous rocks of ultramafic or mafic varieties, with these classifications being partly based on the mineral content such as the presence of olivine.
Step-by-step explanation:
Olivine is found within igneous rocks, which are magmatic in origin. Specifically, olivine is generally found in abundance in ultramafic rocks like peridotite or komatiite and also as a component of some mafic rocks such as basalt and gabbro. The mineral content such as olivine helps to classify these rocks. Based on their color and composition, a rock with a high olivine content that is green due to the mineral's color is classified as ultramafic, while a rock dark in color due to the presence of ferromagnesian minerals like olivine is classified as mafic.