It is to do with the constant and frequent reward reinforcement you get from these games. So for example in online games you are constantly being reinforced by getting money, new items, getting higher in ranks etc. For other games its perhaps a lesser mixture of this and other factors such as escaping from the real world. At times this can likened to the effects of a drug addiction in terms of withdrawal effects, constantly thinking about the game, etc etc.