I always assumed that a roguelike was a nethack-esque game with ascii graphics, but apparently there is more to it than that. Note that I never actually played nethack and all I know about it is that is an rpg.
So what makes a game a roguelike?
The two core components that define a roguelike tend to be random generation and a special style of turn-based action. There’s a lot of other attributes common between a lot of roguelikes, such as one-way dungeons where there are no stairs to go back up, but these aren’t required to be a proper roguelike. Even one of the most common aspects, “final death” where death deletes your save, is not present in all roguelikes.
Random Generation in roguelikes is a completely different scale than most other games. Entire dungeons are randomly generated. Some roguelikes feature specific dungeons that might have the same layout, but the majority of the game’s dungeons will be randomly created. Some times these have persistence, where revisiting the same floor will have the same layout. Other times, there is no persistence and even returning backwards yields completely new floors.
A common extension is that items are randomly generated, and randomly attributed. Instead of seeing a staff and knowing that it’s a staff of lightning bolt, you might see it as an oak staff before identification. But when you start a new save, an oak staff might be for healing hands while the staff of lightning bolt is now a cherry staff.
The end result is that past experience in the game will help you in forming strategies in roguelikes, but it will be difficult to play through with the same strategies since you can’t rely on everything being the same.
Turn-based Action is the other main component. When you take a turn, all other entities will also take their turn. Until you take your turn, nothing will change. It gives a lot of time for people to plan their strategies. The methods in which turns advance will very greatly between many roguelikes: ADOM has a complex speed/energy system for getting your next turn while POWDER has a simple 5-tier turn system for different variations of speed. But you’ll always be able to breathe when it is your turn.