A few months back I introduced a product that is specifically designed for cleaning your grinder. Cafetto Grinder Cleaner, great product and highly recommended but you may want a cheaper alternative and something you have at home.
Don't Use Rice!!!
You may search for solutions and a common suggestion is to use uncooked rice. Don't! Rice is a lot harder than coffee and will add extra strain to your grinder's motor. It will also become paste-like and stick to areas in your grinder you don't want it to.
Even Cheaper, use a Vacuum Cleaner.
Simply take off the hopper and wash that. Then remove any rubber parts and the top burr. Then attach the smallest nozzle you have for your vacuum cleaner and suck out all the old coffee. Attack from the top and bottom. For any stuck bits of coffee get a toothpick and loosen and then suck it up.
For hand grinders with ceramic burrs simply take them apart and wash in warm soapy water. Allow to dry before reassembly.
For hand grinder with steel, burrs use the same method as above for electric grinders.