Its mostly depending on the situation, but what I can say is. Learn how to TECH-UP...You dont know what it means? Tech-Up is when you tier up a unit category, for example you go from swordwrath into spearton...fact is, you have to time your tech-up, to early you got less eco and whatsoever, to late your oppontment will come and win...
So actually, at the beginning, always buy only miners, swords and sometimes archer (situation depends). Then, after you got a good eco, just like 8 miners on gold, 1 on mana (XD its up to you how many) then you shouldnt buy swords anymore, instead start to buy speartons....also, dont forget upgrades like miner hustle which will gave you faster eco....the rest is up to you, how you will continue, your strat, the units you will buy. Just try some things out and practise ^_^