Grading is performed by a pathologist who examines a tissue sample under a microscope. The sample is often obtained through a biopsy or surgical resection. The pathologist assesses various factors such as cell appearance, organization, and mitotic rate to assign a grade.