The word rubric has at least four applications:
a heading on a document.
a direction in a liturgical book as to how a church service should be conducted.
a statement of purpose or function
The application I see and use most often is an academic usage: a guide listing specific criteria for grading or scoring academic papers, projects, or tests.
The word rubric has origins in late Middle English rubrish which was the original way to refer to a heading, section of text. Earlier Old French rubriche had the same meaning and came from the Latin rubrica (terra, red clay or ink as in the red ocher/ochre color).
Medieval printers had few ways to give emphasis to text on headings and the first character of a paragraph. Illuminated manuscripts could be quite elaborate and beautiful, but fonts were not standardized and there was no italic or bold. That left them to use color.
Ochre is a naturally occurring pigment from certain clay deposits containing iron oxides, used since prehistoric times to give color to dyes, paints and inks. Ochre colors are yellow, brown, red and purple. The most common in printing colored text was red ochre. In Latin, red ochre is rubrica and that is the origin of the word rubric as these red emphasized headings. (Scholars who penned manuscripts in red ink were known as rubricians.)
Take this a bit further in the many religious texts that were reproduced. Those texts, used by clergy, included a kind of "stage directions" for the clergy reading. These were printed in red while the text for the congregation was printed in black ink. This gave an additional meaning to the red rubric writing as instructional text.
As universities are created and books become more commonly used, scholars grading student papers would use red ink to leave instructions, suggestions and corrections on student papers. The practice has survived, although in some educational settings it is frowned on.