Mafic rocks are igneous rocks that are rich in magnesium and iron, resulting in a darker color and higher density compared to felsic rocks. They are primarily composed of minerals such as pyroxene and olivine and are typically formed from the partial melting of the Earth's mantle. Mafic rocks are crucial to understanding the composition of the Earth's crust and mantle, as well as the processes that lead to volcanic activity.