A game is a set of rules that determines what the players involved can and can not do. So how to you make a set of rules into something that is "fun"? This is what all game designer and makers should ask themselves.
Yours truly, back in 2011 was a computer science/ digital media student and came across the theory of "fun" which hopes to address the above question. There is also a video of the lecturer explaining the 8 kinds of fun at the end of the tutorial. The following is a breakdown with examples but more stuff relating to game design can be found at http://www.8kindsoffun.com
Game as sense-pleasure.
Evoking of emotions in the player. Sensation is created through manipulation of sight, sound and pace of the game. I cannot stress how important pace is in a game, especially horror games. Most horror games builds sensation very well.
Game as make-believe.
Its easy to argue that all games have some sort of fantasy. Players often seek "power" in a game which gives them what they can't get from real life.
Game as unfolding story.
Having a narrative gives the player a sense of purpose. Not all games have or need a narrative. The narrative can also be thought of as the "goals" of the game. Sandbox games, even with there endless possibilities has a user created narrative. That is the users tells the story through their actions. Interactive story books, point and click games are examples of games based on narrative.
Game as obstacle course.
Puzzle games are a good example. Overcoming obstacles can be rewarding in itself but just to be safe reward the player! Positive reinforcement lets the player know that he/she is doing the right thing.
Game as social framework.
Playing with friends is always better than playing alone. Party games and MMO games are great at this. Fellowship or multi player games adds an extra layer of interaction for the players. Solo games often simulate the experience of fellowship by using friendly AI/ bots.
Game as uncharted territory.
Discovery not in just the game itself but what you learn about yourself. Adventure games are good examples but any game that makes the player learn more about themselves can be thought of as discovery.
Game as soap box.
Expression comes from the rules of the game and its dynamics. Sand box games such as minecraft is all about expression but every game has it. Ever tried to break the game or hack it? Self expression is a very important part of human nature.
Game as mindless pastime.
This relates more to "grinding" or "farming". Most games have some form of this. Submission can also be thought of as the opposite of challenge. If a game is challenging all the time players may be turned off. complaining that the game is too hard or cognitive overload is a good sign that the game doesn't have enough submission for the player. Of course "hardcore" games can be thought of as having less or none of this.
So there you have it. These aren't solid rules that have to be followed but rather, useful things to consider when making a game. They are also very useful when breaking down a game. Next time you play a game that is "fun" try and ask yourself what makes it fun.
Here is a lecture video explaining these 8 points. I would suggest skipping the first ten minutes of it.
UNSW game design lecture