Level 1 - Blink
Level 2 - Scream of Pain
Level 3 - Scream of Pain
Level 4 - Shadow Strike
Level 5 - Scream of Pain
Level 6 - Sonic Wave
Level 7 - Scream of Pain
Level 8 - Blink
Level 9 - Blink
Level 10 - Blink
Level 11 - Sonic Wave
Level 12 - Shadow Strike
Level 13 - Shadow Strike
Level 14 - Shadow Strike
Level 15 - Stats
Level 16 - Sonic Wave
Level 17-25 - Stats
Blink will be skilled at level 1. You have no other spells that are important at this level and levelling Blink here will help you get out of a potential First Blood situation; not only does it blink away, it also avoid most stuns and nukes.
Next, we'll max Scream of Pain as fast as possible; it's an aoe nuke with decent range and it has good damage. Basically it's really important to get kills and harass and it will also be good to farm later. You have no reasons to skip it at all. It's a realy nice and simple spell with lots of damage and good potential for killing one or multiple enemies in ganks and big fights.
Shadow Strike will be taken once at level 4, simply for its slow pupose which assists you in ganking. Some might argue that taking it in this level is not necessary and that a level of Blink would be better. However, though you barely gain any movement speed, especially seeing that you have to cast it first, your allies whom you most likely will be ganking with, will gain a slight speed advantage. This does sometimes, though not always, mean that they can get just in range for a nuke or stun. It's not always that they can catch up if the target retreats in time. Hence if you cast Shadow Strike it makes them able to barely get in range for that disable, which is quite important; often more important than 1 more level of Blink in this level where you will barely be blinking for anything but avoiding stuns at all. It's not vital around here but it will get useful on some occassions. It's more useful later though, when it's levelled up, yet not as important as a high level Blink which is why we level up Blink at 8-10.
Sonic Wave will be taken when it's possible too because it's another really strong nuke and it's one of the most deadly spells to open with in a teamcombat; if you can land a succesful Sonic Wave you will start the combat by fighting with a 100% health team vs a 50% health team. Awesomeness! It's a terrific spell and should not be skipped. It's great for ganks too.
Now, the first thing you want to find out is what lane you want to take. If you're going top or bottom you ought to buy 2 Circlets, 1 Clarity and 6 Tangoes. If you're going middle you ought to get a Bottle. If you're going middle, rune racing (rune racing is the term of grabbing the runes when they appear before your enemies do) is a big part of your job; your Bottle will allow you to spam Scream of Pain while refreshing on the runes. If you're going up or down, rune racing will not be possible + you often find dangerous double lanes in these two lanes hence you need some stats and other means of regenerations than Bottle - tangoes and clarities.
Now once you did that you want to judge if you feel threatened and need more health or if you feel safe and want more mana to spam spells and being able to afford spell combos. You should then upgrade to either 2 Bracers or 2 Null Talismans respectively.
Getting a Void Stone as your first decent item is mostly a good idea as it allows for more spell spamming and it isn't too expensive. An optional good idea could be upgrading it to a Peserverance, though almost only recommended if you're at top or bottom, not middle. Buying Peserverance with Bottle is a little overkill and rather unnecessary; buying it to regenerate health and to afford more Screams of Pain in your top/middle lane is good if you're being harassed a lot.
Finally you should aim to complete a Guinsoo's Scythe of Vyse which will be your main and most important item. Once you have it you will be an excellent, excepcional ganker and noone will be able to escape you. Of course you should try to get a pair of Boots along the way when you think you need them.
Now, as for the luxuries it isn't as complicated as it might look. The first consideration you want to take is how many disables and how many nukes you're facing. If you feel like you're being raped in mere seconds because of disables and nukes then you ought to buy a Black King Bar so you can do your heis. If you're facing some, but not many, disables (and nukes for that matter) then you ought to buy a Linken's Sphere to redirect the worst of it. Finally if you're able to move completely free because your enemies hardly have anything to stop you with, then a direct Eye of Skadi is your choice; it has great stats and synergises excellently with all your disables, slows, blinks and etc. It's great to pick out and chase heroes and it's just all Queen of Painish.
Either way you ought to buy an Eye of Skadi after you've purchased a Black King Bar/Linken's Sphere. Either of these two items can be considered as middle stops on the road and they're there to boost your survivability against nukes and disables.
Once you've taken care of your survivability and if you're still playing the game, you should finally choose a path you want to take; the caster, the supporter or the carry. You will probably not reach this point, but if you do so it's up to you. Aghanim's Scepter boosts your ultimate which is great; Refresher Orb does the job too, but in a different way. Orchid Malevolence/Shiva's Guard helps your team in fights more than it helps yourself. Finally if you need someone to carry, then you ought to buy a damage item. All three ways can be equally good in each of their ways.
After finishing your core items (namely Guinsoo's), and start working on your luxuries you can add either Boots of Travel, Necronomicon or Bloodstone into your build if you need it and if you want it. It's an optional choice if you want to spend money on either of these items, they're all useful on some occassions and it's up to you to judge if you want some Boots of Travel or if you want to work on a Linken's Sphere.
The overall purposes of the item build
First and foremost you want that Guinsoo's Scythe of Vyse because with a disable you're such a great ganker and such a dangerous hero. It also gives you great mana so you can spam your spells more, which is important because your spells are extremely strong; aoe nukes are not a joke. Secondly Queen of Pain wants to be able to move around and blink on demand; if you're caught in a lot of stuns you'll be fragile and nuked down instantly. Akasha can often escape many disables like Storm Bolts, but it's not always that's possible. Surviving and being able to move freely so you can pound on your enemies is an important factor of this hero so you need something to stop the disables and you need health to survive when you get hit by some. If not you're going to die like a fly and you will merely be completely useless.
Your first thing to find out is if you're going middle or not. It's more or less equally good so it's not a hard choice to take. Just do whatever fits your team best.
Anyway, if you're going middle then buy a Bottle and use it to hunt runes; spam your lane opponent(s) with Scream of Pain and refill with Bottle. If you get a good rune like haste, double damage or invisibility you can/ought to for a gank. Ganking with runes are mostly easy and all it takes is to notice your allies you're coming. Go on an enemy with them and merely nuke him down. Rune racing is pretty important when you're running the middle lane; the person that gets and uses the runes also wins the lane control/gank war. It doesn't matter if you lack slightly behind in experience if you can use it to gain the upper hand and create ganks.
If you're not going middle you have a much higher chance to face a tough dual lane at either top or bottom (because that is what most teams do). You can't rune race effectively from the sides either, which means you can't rely on a Bottle. Hence you should buy stats for better survival and find other means of regenerations; Circlets, Clarities and Tangoes.
The primary thing you want to emphasize in a bottom or top lane is your safety. Always try to stay safe. If safety means you have to play passive, then play passive. If you can play somewhat aggressively without putting your safety at risk then by all means do. Like other heroes, safety comes first. Now, when you've taken your precautions you should try to see if you can use Scream of Pain as a mix of last hitting and harassment tool. First and foremost you should try to aim it on your opponent(s) when you're using it. That's the main reason why you want to use it in your lane. Secondly when you're using it to harass anyway you might as well see if you can use it to last hit a creep or two. Especially if you're having troubles with your last hitting, using Scream of Pain to harass while getting +1-2 creep kills is good. But again, mainly use it to harass your enemies instead of merely wasting mana for last hits. In addition, try to land hits on your opponents when/if you can. All in all though, try to focus on your safety and try to focus on last hitting as well. Use harassment as a measure of gaining lane control without putting your safety at risk.
When laning top or bottom you shouldn't aim to roam too much. Instead of trying to create ganks you should rather be ready to join them when your allies create them near you. You should always try to be ready to go in and do your stuff, but running around too much early on can be a huge loss because of the experience and gold you lose. You won't be able to use the runes like a middle hero so trying too hard often results in backfire. Try to lean back and farm your items, play as aggressively as you can without endangering yourself and join your allies' ganks when/if they do some near you. If you're having troubles against harassers, then buying a Ring of Health and upgrading it to a Perseverance with a Void Stone is a good idea. It allows for better resistance and more Screams of Pain.
Once you have your Guinsoo, you're ready to dedicate yourself to ganking. Once you get it, try to let your carries get the farm when they can. Your job is now to go around and gank heroes (it's obviously best if you go with your allies, doing it alone often revolves in taking a risk). Try to hunt and kill as often as possible. Try not to be reckless and try not to headlongly blink around corners or up to heroes when you don't know if there are more enemies nearby. It can easily result in a death. A good way is to blink up near him, yet not right beside him and then open with Guinsoo. If he has more enemies nearby they will most likely show themselves hence you can better judge if you should proceed or retreat. Anyway, like the early game, try to emphasize your own safety. Try to use the surroundings to your advantage; stay uphill if you can, try to stay inside the fog and etc. You're hard enough to target when you have Blink, but using the surroundings correctly and making sure to stay safe is a great advantage.
Try not to stay too inactive. Your main goal should be ganking but instead of running confusedly around looking for enemies, you ought to farm a bit if possible. Try not to waste too much time looking for someone when you have no idea where they are. Eventually try to stay on your mark and when someone appears, then be ready to go after him with an ally.
Obviously try to follow your team around if they attempt something, whether it being ganks, pushes or by other means teamfights. Again, try to avoid focus fire. Try to always watch your position and if you're standing in the middle of a total wreck then get out of it. Try to avoid being caught by initiators like Tidehunter, Magnus and Earthshaker; if you know they have heroes that can blink right in and catch you, then stay out of range untill they jump in or untill your team goes first. Being caught with ease by a Reverse Polarity when you have Blink to stay at range and jump in at the right time is stupid and completely unnecessary. Your position before, during and oftenly after all types of combats (ganks, big fights etc.) is important. You're a weak healthed hero, but you can be very difficult to catch because of Blink so by all means remember to take your position into account.
Ganking after you finish your Guinsoo and farming casually when there's nothing to do is the main points on the middle game. Avoiding potential ganks when you have your Guinsoo because you want to farm instead is a very bad idea.
It's time for the big fights. The principles as before are the same; always watch your position and always take your own safety into account. Avoid being caught in bad ultimates. Eventually start from afar and blink in once they've thrown the worst of it. Once the combats starts and you feel you can get in safely, then blink in and open with your Sonic Wave. Hitting all enemies is not mandatory but try to hit as many as possible. If you see they cluster somewhere, try to get a hit on all of them. If you open with a good Sonic Wave, all of those who get hit will lose just about 30% of their entire health in a single ultimate. That's a pretty damn huge difference between you and them.
So all in all, follow your team in team fights. Try not to get caught by disables, nukes and ultimates from the start. Blink in at the right time and cast Sonic Wave on as many as possible. Continue hitting manually and use Scream of Pain to kill them too. Picking out weak casters or other low healthed heroes while/if you can is a good idea. Once the first few seconds of the combat has pasted, most dangerous spells have most likely been thrown thus you can blink after their weak heroes with easy. Always, always, always try to think about your safety still though. Taking risks often results in your own death.
Don't be egoistic and farm passively all the time. If you have your Guinsoo, you're done with your core items which are the important ones. Any items from here are mere luxuries. Hence you should try to let your real carry hero farm if he comes to your place. Anyhow, like before, just try to farm somewhere if you have nothing else to do and if noone needs you anywhere. Try to participate in fights, ganks and defenses as much as you can. Farming comes last in the "actions hieraki". Teamplaying ranks the top, whether it's defending, pushing, ganking or fighting anywhere else.
Queen of Pain 1
Queen of Pain 2
Credited: Thanks to Ingolf, dota-allstars.com, dota allstars wiki