Types of magma and rock compositions

What are the four basic types of magma and rock compositions, and
how do they differ in their respective abundance of silica, iron, and
magnesium?