You grate food by rubbing it against a grater. A grater is a board that has lots of holes in it with sharp edges, and it scrapes small pieces of the food off with these sharp holes. The result is a pile of finely grated food. The most commonly grated foods are cheese and carrots.
A grate is a piece of metal with holes in it that is used as a lid or some other covering over a larger hole. The main purpose of a grate is to let liquids through, but stop solids getting through. Grates are usually used over drains. Very large grates like the one in the picture are strong enough for cars to drive over, while still letting water drain away. You may also be interested in grating food.