DnD originally had only 3 choices of character you could play—Magic User, Fighter or Cleric. A later version added Elf as a class. It was fairly simple compared to the later versions.
AD&D added races to the game. Instead of just being a human (unless you played the Elf class) you could be several other races, like hobbit, half orc, dwarf. You played a race and a class together so instead of just being a fighter, you’d be a half orc fighter or whatever. This game was very complex and needed lots of cheat sheets to remember which dice to roll and how to use percentages and add and subtract. Outside of the realm of playing, AD&D had very strict copyright laws and the only products you could buy were from the house that published the core rules.
Few people play either of these versions anymore.
—-
D&D 3 and 3.5 edition were called the d20 editions. This was a reaction to the over complexity of the dice rolling from AD&D. Most of the dice rolls were simplified to the rolling of a 20 sided dice (aka the d20). There was more flexibility in races and classes. You could theoretically play any race listed in the monster manual. I’ve played a kobold sorcerer and a naga mage. This wasn’t possible in the other editions.
One VERY cool thing about 3rd edition was that Wizards of the Coast bought the rights to DnD gaming. They allowed other publishing companies to make their own supplements to the game. This opened up a lot of creativity and flexibility in the system.
While 3rd edition is technically outdated, people still play it in the form of a game called Pathfinder. People didn’t like 4th edition DnD so kept 3rd addition alive and kicking this way. I’m not sure if the Pathfinder folk are allowed to publish the core rule books or if you have to buy the original 3 or 3.5 edition books made by Wizards of the Coast. But I know there are a ton of Pathfinder supplements that all work on the d20 system.
—
I don’t know much about 4th edition except that it was wildly unpopular. WotC tried to make the game accessible to people who didn’t like tabletop RPG. They failed. They also turned off their fans. They streamlined the game and made the gaming system work more like World of Warcraft, a very popular multiplayer online RPG. I played it a few times and found it kind of fun, but gimmicky. I was also mad because they had narrowed the choices of race and class again so it was much more restricted. I don’t know ANYONE who likes or playes 4th edition.
I know even less about 5th edition. I’ve heard some people say that it fixes some things people considered in 3rd edition and the creators just pretended 4th edition never existed.