You set up a subscription. Both worldofwarcraft.com and, for European players, wow-europe.com handle account creation and payment, and you can pay monthly or buy time in blocks.
Game cards sold at retailers are the alternative if you'd rather not put a card on file — they add a fixed amount of play time to an existing account.