In interactive fiction, the endgame is usually a series of puzzles that come near the end of the game, when the backstory has been completely uncovered, the significance of all the subquests becomes clear, and/or the special capabilities of inventory items are revealed.
If the player has invested time in getting to know the game world well enough to solve its central puzzle, a good endgame — with puzzles that are not too hard, but that either come at a fast and furious pace, e.g. Christminster; or that invite reflection upon the actions described in the main part of the game, e.g. Jigsaw — can be an extremely rewarding experience.
Note: In chess, the endgame is the final stage of play, when only a few pieces are left on the board.