The cost depends on what you mean. If you are after the original Warcraft, you could probably find a used copy on eBay for just a couple of dollars. But most people asking this really want to know what it costs to play World of Warcraft, so here is a breakdown in the order a new player would care about.
There are free 10-day trials you can use, though they come with limited communication to curb spam and gold-selling. A friend who already plays can send you a special email invitation for another 10-day trial that grants triple experience when you are near their level, plus the ability to summon each other, all lasting 90 real-life days after you create your account.
The key for the original game costs $19.99 USD, and upgrading to a full account includes one free month of play. Any prepaid game time stacks on top, so you never need to wait for time to expire before adding more.
After your free month, there are four ways to pay, three of which are subscriptions: a month-to-month plan at $14.99, a three-month plan at $13.99 per month, and a six-month plan at $12.99 per month, with the longer plans paid in full upfront. There is also a retail prepaid card covering two months.
Expansions add new content, and you generally need them to keep progressing at higher levels. The first expansion costs $29.99, or you can grab the Battle Pack with the base game and first expansion for $39.99. The second expansion runs $39.99, and the third, which unlocks all content up to that point, also costs $39.99. The game is patched regularly, so you never wait too long between additions.
Beyond the trial and free month, there are two ways to earn free time: Recruit-A-Friend and the Scroll of Resurrection. With Recruit-A-Friend, you invite others and enjoy triple experience near their level; when your friend pays for their first month, you get a free month, and when they pay for a second, you earn a rare two-seat flying mount. You can send up to 20 invitations, each expiring after 30 days if not accepted.
The Scroll of Resurrection lets you invite a friend who has been away at least 90 days for 10 days of play, including access to the first expansion. If they return and pay for another month, that free month is yours. It is harder to pull off than Recruit-A-Friend, with several conditions and limits, so many find it more hassle than it is worth.
10-day free trial, about $40 for the full game and first expansion with a free month, roughly $15 a month after that, and $40 each for the second and third expansions.