The modification of a word to reflect grammatical categories such as tense, person, number, gender, and case.