For example, "Ivan the Terrible" or "Conan the Barbarian".
The grammatical construction in the examples is called apposition. Note that the definite article "the" is not a necessary part of an apposition, an example without article is Mary, Peter's sister,. In languages with case marking, the appositive often agrees in case with the head known, in German Friedrich der Große is declined as
Friedrich der Große, Friedrich des Großen, Friedrich dem Großen,Friedrich den Großen (Nom., Gen., Dat., Acc.)
These "titles" are called epithets as already brought up in comments.
As for what this structure might be called grammatically, German employs a near identical structure which can be analyzed as an Adpositional Adjectival Noun.
This is just a fancy way of saying that we have a noun-like adjective after the name:
Friedrich der Große / Frederick the Great
Despite the apparent nounification (indicated by the Große with a capital G), this adjective is still declined as if it were der große Mann / the big man.
Well why reverse the order of the adjective and noun at all? You could maybe compare it to how "A sky blue" sounds a lot more poetic, emphasizing the quality of being blue, rather than "A blue sky".
I'd like to believe we can analyze epithets in English identically.
Ivan the Terrible
isn't all too different from
The Big Lebowski
For anyone who has seen the movie there's also The Dude Lebowski, so this second naming convention is employed to distinguish between the two Lebowski's. Whereas when we say Ivan the Terrible we mean, Ivan, the Terrible (Tsar, someone you shouldn't be messing with).
Whether to treat the Y as more of an adjective or more of a noun is up to you, but I hope this clarified things a bit.