Players spend their hard-earned real-world dollars, exchanging them for virtual money in their favorite games. It happens so much that some online games have economies that have become incredibly inflated.
An interesting note is how the Classic version of World of Warcraft features a higher real-world currency than the current live version of the game. One big reason is how you can legally buy gold in World of Warcraft (WoW) today; you can't do that in Classic WoW.
There are quests, goals to achieve, things to collect, as well as hunt and craft. But it also includes player vs player (PvP) elements. It also brought with it an inflated economy. For example, $1 translates to over 1,600 gold in-game.
The futuristic space trading and combat simulation MMORPG uses a temporary currency called Alpha United Earth Credits (aUEC), which will be reset from time to time and at the final release of the game. The controversial online game has an exchange rate of $1 to 6,662 in-game units.