It depends if your grinder is either burr, or blade.
For Blade: a common trick is to fill the grinder with rice. Run the rice for about one minute until it collects the oils and removes the extra coffee grounds. Pour the rice out, repeat if necessary, make sure to unplug it then wipe down the grinder with a damp cloth and wipe into the crevices.
For Burr: Unplug the grinder, remove the bean hopper and empty it out. Clean the inside of the hopper with a little bit of soapy water and rinse. Remove all the other accessible pieces including the grind chamber and wash them. Remove the inner burr (possibly with a screwdriver). Using a toothbrush give the parts a good scrub, use a toothpick for any hard to reach areas. Clean the coffee chute where the beans are loaded up and then let all the parts dry and reassemble.