How does the composition of crust affect its density?

Density is basically weight. Basaltic oceanic crust is more dense than granitic continental crust because basalt is more dense (heavier) than granite.