One major difference between basaltic and granitic magma is their specific mineral contents. Basaltic magma contains between 45 and 55 percent silicon dioxide and is high in magnesium, iron and calcium, while granitic magma contains between 65 and 75 percent silicon dioxide and only small amounts of those minerals.
Granitic magma has high levels of potassium and sodium, while basaltic magma has very low levels of these minerals. When magmas are judged by mineral composition like this, they are technically referred to as felsic, which is granitic, and mafic, which is basaltic.
Another major difference between these two types of magmas is the temperature that each needs in order to stay liquid. Felsic magmas are normally between 650 and 800 degrees Celsius, whereas mafic magmas are between 1,000 and 1,200 degrees. This is because the mafic minerals melt at much higher temperatures than potassium and sodium, the felsic minerals. Due in part to the lower temperature, felsic magma is much more viscous than mafic magma, meaning it is much thicker and more resistant to flowing.
Although basaltic magma can result in basaltic rocks and granitic magma can result in granitic rocks, they can also form other rocks depending on how quickly the magma cools. Granite is formed by the slow cooling of magma within the surface of the earth, while basalt is formed when magma quickly cools after breaching the earth's surface through volcanic activity.