Toolmaker here, (machinist) when grinding or sanding materials, the abrasive will cut small chips as it scratches the surface of the material. Size and shape of the chips will vary depending upon the material, coarseness of the abrasive etc.
Let's look at steel for example. the sparks you see...