Achieving this is not easy, though. The dungeons are always randomly generated, always different, and feature 50 different levels. Each of these levels includes lots of enemies and traps that can kill your character, and when this happens it's game over – no reloading the game, no reviving the hero.
When creating your character you can choose from many different classes, like the warrior, barbarian, mage, thief, or monk; and you can also choose the race, gender, and name. On the other hand, if you don't want to worry about any of that, you can generate a random character. It will probably die soon anyway....
Nethack didn't originally have a graphic environment, and was played exclusively with a text interface. Currently, though, you can activate pretty rudimentary graphics, which at least makes the game a little more accessible.
Nethack is a difficult game, possibly one of the most difficult games in history. Getting all the commands you can give the character right is already a challenge in itself. But getting to level 50 alive is an almost impossible goal.