In the game of Skyrim, your character gains levels through use of their skills- each time a skill gains a rank, the character gains experience towards improving their character level. Because of this, in the original iteration of the game, there was a limit to how many levels a character could gain: once all skills are at level 100, the character can gain no more experience and thus no more levels. They have reached the peak capability.
One of the introductions in later versions of Skyrim was Legendary Skills. Despite the nomenclature implying that these skills are somehow superior to the original skills or represent an even further level of capability, they are actually exactly the opposite.
Once a skill reaches level 100, you can use the Talent screen to choose to make that skill Legendary. Doing so has three effects. First of all, it refunds you all the talent points you put into learning talents for that skill, taking away all of those talents. Second, it reduces your rank in that skill to 15. Third, a Skyrim dragon glyph appears over that skill in your Talent screen. This allows you to level the skill up all over again, thereby gaining XP for the skill ranks just as you did to begin with.
Making a skill Legendary can be both a great thing and a terrible thing. The terrible side is what you need to be most aware of before choosing to make a skill Legendary, so I will go over that first.
A Legendary skill is in no way more effective than a non-Legendary skill at the same rank. This means that, in reducing that skill rank to 15, you have now lost most or all of the progress you made in that skill during the game. This renders you barely competent at whatever the skill was, and the loss of the associated talents only hurts even more in that regard.
For this reason, combat skills and magic skills you intend to use a lot are generally poor choices for Legendary skill ranking- making them Legendary drops your damage output or protection right through the floor, and since most enemies you encounter will be tuned to your character level rather than to your skill ratings and talents, it can easily result in a lot of dying even to common wild animals and randomly-generated bandits.