It depends. It could be a free download and basic gameplay. Pay for add-on items, premium content, better items, etc. Like Farmville or The Smurfs.
Or maybe you do need to buy the game, but the online multiplayer is free to access, but you have to pay for each little extra thing you get.