The single most important ingredient in a fun game is keeping the player interested. As someone getting into game design, I've learned that the best titles make you care about what happens next.
A great example is Call of Duty: Modern Warfare 2, often praised for its story. Throughout the campaign, the player is repeatedly shot, stabbed, and betrayed by the same antagonist — and only at the very end do you finally get your revenge. That long build-up makes the payoff feel incredibly satisfying.
Denying players the chance to complete their objectives right away is a classic technique for building engagement. Other things that make games fun include: