I have noticed that sometimes we write ordinal numbers with the "th" a little higher than the numbers. But sometimes I see it just attached to it. Which one is correct?
The difference is a pure matter of style . Writing the 'th' in miniature as superscript is a long-established convention, used, I imagine, to create a visible distinction between between the written word thirteenth and the corresponding 13th.
Well, you can see one of the main reasons for using the ordinary 'th' and its superscript sibling: for some reason, either the version of the typing application that I have does not have the facility of allowing the miniature superscript I want, or, more probably, I do not know how to access it and cannot be bothered to access it.
Most commercial or academic publishers and all major newspapers follow their own policy for the printing of ordinal numbers, and will insist upon compliance with their policies for writing, grammar and punctuation. For more ordinary folk, whether to go superscript or not is a matter of personal choice.