How are user titles generated?

On the User Preference, there is a Title entry with an edit icon, the user can select a Badge/TL level to utilize as their title. Admin and Moderators on the other hand can alter the User’s Title to any custom text via the Admin > Users area.