Granite is primaraly composed of quartz and feldspar. Quartz is very resistant to chemical weathering. Feldspar weathers easily into clay minerals. Thus mountains made of granite weather into sand grains made of quartz and clays. Sand grains are heavier than clays, and tend to get carried further by water before they sink to the bottom. Thus the edges of continents tend to get accumulations of sand, while areas offshore tend to get accumulations of mud.
Igneous rocks solidify from a liquid magma as it cools.