What is a grading?

A grading can be compared to a test in school. You make a practical test were you show the techniques one should know and a theoretical test, which for kyū ranks means a written homework and for dan ranks is both a written homework and a written test on the day of the grading test.