In addition to supporting different applications, sanders and grinders feature different parts. All sanders feature sandpaper or a sanding belt. Sandpaper and sanding belts are thin sheets of an abrasive material.
Grinders don't feature sandpaper, nor do they feature a sanding belt. Instead, grinders feature a cutting disc. The cutting disc is a wheel-shaped bladed tool. As it spins, it will cut into the object to which it's exposed. You can use a grinder to easily cut through objects, assuming the cutting disc isn't dull.
Both types of power tools support a variety of materials. Sanders are typically used with wooden objects, grinders are used with metal objects. If you need to cut through a metal object, you may want to use a grinder. To sand down a wooden workpiece so that it's smooth, you should use a sander.
Grinders are more versatile than sanders. You can use them in more applications. Sanders are limited to polishing, sanding and buffing applications. But grinders support all cutting-related applications.