So I decided to buy WOW. What is better, buying cds or buy it from blizzard web store? I understand I will need to pay monthly for subscription to be able to play Legion. And if I buy the cds do I need to buy every single patch? And do I need to buy subscription anyways?
Welcome to the World of Warcraft :)
What is better, buying cds or buy it from blizzard web store?
If you are worried about internet usage, the CDs are useful in the fact that they would lessen the initial download size of the game. However both versions will update with future patches the same so there is no difference after the initial purchase.
I understand I will need to pay monthly for subscription to be able to play Legion. And if I buy the cds do I need to buy every single patch?
WoW is constantly getting new patches, which you don't need to pay for.
What you will need to pay for are WoW's expansions. The World of Warcraft base game always comes with one free month of subscription time, as well as all the expansions up to the newest one, which in this case is Legion.
For example, I started playing just before Warlords of Draenor came out, so when I bought the WoW base game, I got everything up to and including Pandaria. I had to purchase Draenor separately, and now I purchased Legion separately.
In your case just starting now, purchasing the base game includes everything up to and including Draenor, and Legion as well as any future expansions will have to be purchased separately.
And do I need to buy subscription anyways?
The first month is free! Blizzard includes one month free with the base game.
After that there are multiple methods to pay for your subscription, including spending in-game gold, however you will need a lot to keep your subscription going this way!
You can of course find more information about exactly how you can pay on Blizzard's website.
If you want to play World of Warcraft, buying the physical or digital version of the base game does not impact much in the long run. Either way the particular CD-Key will become associated with your Battle.net account. Both of them will have to connect and download data from the internet, but the physical version will have less in the way of initial downloads.
You will need an active subscription to play World of Warcraft characters above level 20. This can be paid either via game time cards, directly through a subscription, or using a WoW token (purchased with gold in-game). You do not need to pay for each patch, those are provided for free.
It does not matter at all.
If you buy the CDs you can enter the key(s) and choose whether to install from CD or from battle.net. Once the key is associated with your account you can do whatever you want.
Installing from battle.net is the faster way, if you internet speed is good. The initial installation is already up2date as it will download the latest files right away.
Installing the game from CDs will give you the current installation kit up to Warlords of Draenor (Battlechest) and then update the game to the current live patch (currently that's 7.0.1, the Legion pre-Expansion patch). This takes a lot more time until you're good to go, since you install an outdated version (6.0.3?) and have to update it.
In 2 Weeks you'll need another CD or digital copy to get Legion, but the installation time/effort won't be affected. The current patch already holds most of the required files. After this it's all about unlocking the new continent.
Long story short:
Do whatever you like. Some people love to store CDs in their shelf just because they can.
The monthly subscription has already been answered by hammythepig, so I won't address this issue here again.
If you want to play World of Warcraft, then play it. It's free to start. You can just download and start playing.
By downloading the game, you can play for free to level 20, with some restrictions (Can't join a guild, chat limitations, gold limits) but it will give you a feel for the game.
If, at any time you want to get rid of any of those limitations, you can buy the game (costs about $20 digitally or physically, but either can go on sale), your first month without those limitations is free, after that you'll have to subscribe, or you'll have to go back to those limitations (any character beyond level 20 is locked). Subscription fees vary by region, but it's about $14 USD / month, or you can pay using the in-game currency in the neighborhood of about 50,000 gold.
After you've done that, all expansions are included except the most recent expansion (so as of writing, Warlords of Draenor is included, so you can play through level 100)
If you want the newest content, or you want to play past that level limit or, to play as the newest [class or race or whatever, currently the Demon Hunter class], you'll need the latest expansion (currently Legion)