Itís pretty much common sense to come up with a good formation for your army but basic idea in most situations is to have your infantry in front, ranged units behind, cavalry protecting flanks and your general right behind infantry. Having general next to your infantry boosts their morale. If you have larger numbers than enemy, itís usually a good idea to spread your formation so you can surround enemy.
B. Flanks and Rear
The flanks and rear of any army are its most vulnerable points. By placing cavalry on side you can help protect your flanks. When facing an enemy, always try to attack its flanks or rear with your army, especially your cavalry. A cavalry charge to rear can devastate any unit and lower its morale. When facing an army unit such as Greek hoplite phalanx, you must use slow speed of enemy to your advantage to flank opponent. The Phalanx is particularly vulnerable anywhere except front. One tactic that seems to work is to slowly flank enemy is to form your troops in a slight half circle so you can slowly surround your enemy. Never let your infantry become isolated, try to keep them in formation in a line so they dont feel like they are being surrounded.
The morale of your troops is most important aspect of a battle. If your troops are surrounded they will lose morale and try to escape in a rout. Try to prevent this and use this to your advantage by surrounding troops whenever possible. Showering arrows on enemy army lowers its morale Also, launching a surprise attack on an unprotected side has same effect. Having enemy generals near your troops lowers their morale slightly, this is also true of your general and enemy troops. Keep in mind that more experienced troops have higher morale. New troops will most likely rout if your general flees.
All units on battlefield know who is winning battle by observing their surroundings. If they see any unit or a general fleeing, they are more likely to flee. Use this to your advantage; if you have a unit surrounded and they are routing, let them flee rather than let them fight their hardest to get out of their situation. Once other enemy units have seen them, mow them down with your cavalry to show other army who is boss.
D. Unit strengths
Each of different unit types is vulnerable to another type. Cavalry is vulnerable to frontal spear attacks. Light Infantry is vulnerable to cavalry and Heavy infantry is also vulnerable to side attacks from cavalry but is effective in hand to hand combat. Artillery is good offensively against almost any unit but is extremely weak defensively and dies quickly after a head on attack.
Elephants are a great unit against infantry and lower morale of enemy troops. They can be supressed by a large number of ranged units and scare tactics such as incendiary pigs. Your Elephants may also turn and attack your own troops in which case you have option of using special ability where your rider executes them.