Clean it immediately , before anything has a chance to dry.
As soon as I'm done grating anything, I run the grater under water and wipe it with a sponge.
Wipe with the direction of the blades, then run a little water inside it.
Optional: put the grater in the dishwasher to clean fully.
cooking.stackexchange.com/users/4795/Justin
I put mine in the dishwasher.
If that doesn't get it clean, soaking it for a while and then brushing it with a stiff brush usually does the trick.
cooking.stackexchange.com/users/4127/adebaumann
The best way that I've found to clean a grater is to use a toothbrush.
The bristles are usually the right combination of stiffness and flexibility to not get caught in the blades of the grater (so you don't end up with grated toothbrush bristles), and they are fine and tightly packed, fitting into the tiny spaces and removing stuck on bits of ginger or cheese quite well.
I expect some vegetable brushes might also work well, if the bristles are thin and tightly packed.
For the shredding or slicing sides, a washcloth is usually a better choice, but for the grating sides, I haven't found anything as good as a toothbrush.
cooking.stackexchange.com/users/9057/Theodore Murdock
I use a dishcloth to brush mine with the grain (upside down of how you cut).
This works for the larger holes.
It doesn't work so well for the zester-sized holes, which catch the cloth no matter which direction I move it.
In that case I use a brush.
After it is clean, I put it in my aging dishwasher which doesn't do much cleaning but does send hotter water at it than my hands can stand.
cooking.stackexchange.com/users/1816/justkt
Try giving your grater a spray with Pam before using.
It makes it easier to dislodge small bits when cleaning.
cooking.stackexchange.com/users/10749/gail
Clean the grater immediately after use.
Take a rough sponge or plastic hair brush and scrape towards yourself, or in the opposite direction you would grate.
If you happen to use the common 4-sided grater with the hard-to-clean truncated pyramid interior, say scrap it and get a microplane grater.
They are a lot easier to clean and better at grating.
cooking.stackexchange.com/users/14506/underarock
This is copied from my answer on cleaning a vegetable peeler.
Soak in a mild borax solution.
fill the sink and throw in gummed up juicers, colanders and tea-stained spoons as well.
If your kitchen is humid, a bit of an oil rub after thorough drying should slow down the rust.
Maybe doing this once a week would do the job.
cooking.stackexchange.com/users/6638/Pat Sommer
I put mine in to soak in washing up water for 15-20 mins whilst I clean up elsewhere.
I then scrub down each surface with a washing up brush and rinse with clean water to dry.
Comes out sparkling clean every time regardless of what I've been grating on it and the same one has lasted for years.
cooking.stackexchange.com/users/14539/spiceyokooko
I give mine a solid whack on the sink or bench top.
This dislodges most of the solids, then wipe.
Also works great for sieves.
cooking.stackexchange.com/users/5848/askvictor
A plastic version of a wok brush works great.
Like this: http://www.hdxy.org.cn/brown-bamboo-asian-style-wok-brush-pot-brush-11473.html
cooking.stackexchange.com/users/16938/user16938
I recently read somewhere that putting some parchment paper on top of the grater while you grate, does not make the grater dirty.
I was sceptical, but I tried it anyway.
I put some parchment paper over my grater and grated a clove of garlic, I peeled off the paper and there were no bits left in the grater.
The paper was still intact.
However, the garlic was very fine, sometimes a bit mushy, so I'm not sure yet if this works with everything.
I will update this answer after I tried it with some citrus and nutmeg.
cooking.stackexchange.com/users/4580/Mien
A grater is a very useful instrument in the kitchen and it's fun to use. You can use it for a lot of food: cheese, citrus fruit peel, nutmeg, all kinds of vegetables, etc.  But cleaning a grater is a pain.  Anyone here knows an easy and effective way to clean a grater?
What is the best way to clean a grater?
cooking.stackexchange.com
<equipment><cleaning>
cooking.stackexchange.com/questions/12048
cooking.stackexchange.com/users/4580/Mien
Clean it immediately or leave to soak for a bit after use, possibly in a mild borax solution. You can use a brush or dishcloth (working with the grain) to clean it, and spray it before use to prevent food from sticking. The easiest solution is to clean the grater before it dries. Otherwise, put it in a dishwasher or soak in warm water before cleaning with a brush.
Clean the grater before it dries. Use a dishwasher or soak it in water before cleaning. You can use a brush or soak in a borax solution.