Years after a devastating war between humans and monsters, a child has fallen through a hole and into the monsters' underground world. Under the care of a kindly monster woman named Toriel, they learn the basics of the underground world, including that they may be attacked by other monsters who are less friendly. After the child leave's Toriel's care, it's up to them how they proceed through the underground, including whether they kill the monsters in their way or try to find peaceful resolutions to conflict.
Undertale is an Eastern RPG with some action aspects in its combat system. In the overworld, the player explores areas, solves puzzles, and talks to NPCs. When a battle is triggered, typically through random encounter, the game switches to the combat screen. A heart representing the child's soul appears in a small box, in which objects representing the monsters' attacks appear and must be dodged in real time. On the child's turn, they can attack monsters more directly through the fight command. A meter that determines the strength of the player's attack must be hit with good timing in order to deal more damage.
Alternatively, players may choose to perform friendly actions in battle or show mercy to the opponent in order to resolve conflict without bloodshed. It is possible to finish every encounter in the game without killing anyone, though some monsters are more difficult to do this with than others. The player may need to perform certain actions in the overworld before some monsters can be befriended.
Although only one Undertale save file can be kept at a time, the game remembers certain player actions across playthroughs, mainly in reference to how violent or peaceful they were. Resetting to an earlier save or starting a new game after specific actions are taken can affect how some NPCs treat the player and how the story is ultimately resolved.