The number of stars you earn is determined by your score.
Your score accumulated over fights, so after one or two fights you should get three starts for every one after.
However, fighting a boss battle resets the score upon completion, meaning you'll have to fight in other battles to reaccumulate your score. Additionally, when fighting Pontius the score accumulation exploit won't work.
Also, if you get less than three stars on a fight you completed with three stars, you'll lose your three stars and get the new amount instead.
As long as you're attacking, you will not be able to control your movement. If you want to do so, stop attacking and you'll be able to move and turn around at the end of the attack animation.
It's best to run away from a fight when you've got enemies behind you. Even the grunts can tear out a big chunk of your health in one hit, so if you're surrounded just move towards the edge.
Health potions are by far the most useful item to have, and are pretty much mandatory in the later levels. Tridents are more expensive than they're worth, Golden Lager is useful only in farming, Elixir of Cooldown is completely useless and Popularity Mints are too situational.
Likewise, Shock is by far the best spell in the game. It deals huge amounts of damage, affects everyone around you (very useful if lots of enemies are piling up on you) and can also serve as a mass interrupt (it interrupts enemies' attacks as if they'd been hit, allowing you to momentarily prevent enemies from stabbing you in the back).
Dual weapons are amazing, especially when farming for gold, but become a lot less efficient in the later levels when fighting tons of armored enemies. Shield weapons are the best for crowds, and heavy weapons are perfect when faced with defender-intensive waves.
Also, if you see a defender-type enemy tuck in their head, get the hell out of their way. Their shield charges deal more damage than an assassin's damage burst.
Priority List (may vary depending on circumstance): mage -> assassin -> healer -> giant -> defender -> grunt
Towards the endgame, you're going to have to farm previous fights for gold to get the best gear. I personally recommend fight IV in Bloodshed Alley, which is full of squishy mages and grunts who both carry lots of gold and die very quickly, and the Justonius boss battle which, if done right, can get you a lot of money very fast. In both cases, equip your best dual weapon and Golden Lager.
Boss tips:
Mikus is pretty easy to kill. Just pick out every other enemy first before moving on to him. If you're having trouble dealing with him, equip a heavy weapon. His attacks are slow, so if he raises his weapon just run away while he misses.
Justonius can be either really easy, or really difficult to kill. In the first two waves, you're going to have to accumulate crowd excitement as much as possible. Hopefully, you should end up with a full bar, otherwise just top up on the grunts afterwards. Once Justonius arrives, activate your ultimate and whale on him (use dual weapons, he doesn't have much armor). Contrary to what the blurb says, he is not invulnerable when channeling his spells, though he takes reduced damage. However, unless you're farming him with much higher level gear, it is not advisable to do so. The most important thing when he's channeling a spell is to just run around. His lightning burst spell follows you around, and his blue missiles are stronger variants of the mages' homing blue bolts, so dodge them as actively as possible.
Pontius is actually a lot easier than he seems, once you get to know him better (/innuendo). First off, equip your best heavy weapon. By this point, all of your gear should be obsidian. As with giant enemies, your attacks won't interrupt his. However, with a heavy weapon you'll be able to actually damage him, and even outdamage his channelled heal. If he starts channelling, just run away. He'll either start healing himself, in which case just give him all you got, or he'll call down a meteor storm in the area around him, which can be avoided by just staying away from the radius. Spells aren't very good in obsidian gear, but if you want to deal a little added damage pick any spell except for Shock, which is inefficient here.
Also, since he's the only enemy and he keeps hitting you, it may seem practically impossible to get three stars in this fight. What you need to do is the following: equip the Popularity Mints (maxed out to three) and attack him as normal until he's very close to dying. Then run away from Pontius and gobble up two of them (use the third if he manages to damage you). This way, you'll have a full bar. Then, activate your ultimate and attack him until he dies. Since your score is multiplied by five when you kill someone during your ult, you'll get a score of 7500, which'll net you your three stars.