If they form square, to defend against the cavalry, they are more vulnerable to the infantry. If they form a line, to deal with the infantry, the cavalry may fall upon their flank and rout them. I find the increase in tactical complexity makes the game more interesting than its predecessors in the series, but your mileage will vary in accordance with your tastes. If you prefer the slugging matches of the American Civil War over the fencing finesse of the Napoleonic era, you may not be as intrigued. In addition to tactical formations, the game models unit cohesion and morale.
Units gain cohesion from their training, favorable terrain, and the presence of friendly leaders.
Predictably, they lose it primarily through violent contact with the enemy. Cohesion is easy to lose and hard to regain, especially once a unit routs. If possible, it is best to bolster your units as best you can, and rotate them out of the line to recuperate if at all possible. The entire cohesion system seems based on miniatures rules - but despite the simplicity of its display to the player, it's a system detailed enough, under the hood, that it would be a real chore to keep track of manually. Remarkably, the interface has been kept clean and easy to use in the process.