Microsoft Office features AutoCorrect which replaces text as you type it. In addition to correcting spelling errors, it also formats the ordinal abbreviations as superscript text. So when you type ...
You can add a superscript or subscript in Word using the appropriate buttons in the Font section of the Home ribbon. You can also use keyboard shortcuts to format text as a superscript or subscript.