Mark Rosewater, head designer for Magic: The Gathering, defines a game as something that contains the following components:source
A goal(s): Players need motivation. Something to direct their actions.
Restrictions: A challenge(s) that keeps a player from simply completing the goal. Fun comes from figuring out how to overcome challenges.
Agency: A game needs to have decisions, and those decisions must matter. Allow the player to decide how they are going to play the game.
Lack of real-world relevance: A game is something that you opt into doing because you want the experience of playing it.