I think it has something to do with the trophies you earn. If you click your little profile picture in the top right corner, you can see the trophy points you have. If you click on the number to the right of the thing that says trophy points you can see your awards and all of the available ones. I'm not positive though, could also be related to the amount of time you have spent on the forum.
As the others have said, the title depends on the message count (that's in the list under your name)
You may occasionally see something else there and that's because years ago once you reached a certain message count you could choose your own title. Although you haven't been able to do that for years, some members who have been registered a long time changed theirs before it was dropped.
And staff members have moderator or admin as their title.