Each game aims to engage users to make them feel pleasure and relaxed. How do game developers do it? A lot of peoples says that developers uses clever psychology tricks to access the pressure of the players. The obstacles, user encounters are designed to control difficulty peaks and satisfaction. However, none of these “tricks” wouldn't worked fine if the mechanic wasn’t so good or “fun.”
In which case, what does "fun" factor is? To correctly answer this question, we need to know the definition of "fun". For example, the idea of fun for my father in law is to fly gliders; for me, it's more fun to fly a plane instead boring glider. Comparing to games, puzzles games will be fun for one person, whereas strategy games are fun for another.
Check out fun definition on Wikipedia: https://en.wikipedia.org/wiki/Fun
How to design games to make them more "fun"
One of the most common solutions in the industry is Mechanics-Dynamics-Aesthetics (MDA). This framework is a tool used to analyze consumption of games by breaking them down into three components - Mechanics, Dynamics and Aesthetics. These three words have been used informally for many years to describe various aspects of games. This framework was created by Marc LeBlanc, Robin Hunicke, and Robert Zubek in 2001. Many companies rewrite and adapt this model to their needs, but to start you have to know fundamentals: