There are over 100 different unit types in MTW and although they all have different strengths and weaknesses, they can be organized into general categoroes or classes of soldiers

SPEARMENSpearmen are the defensive backbone of the army, as they can fend off most cavalry attacks from the front.  no horse will ever willingly charge into a wall of spear points.  With the front two ranks able to fight spearmen can also be useful offensive force too. Pike men are even better, as even longer spears allow the front four ranks to fight at the same time.
MISSILEFor the most part missile troops are armed with bows and arrows, although the quality of these weapons varies tremendously. All of these troops are best used to kill enemies at a distance.  Some can fight well in hand-to-hand combat, but this is only a last reosrt or to ambush an enemy front behind.
SKIRMISHERSA sub category of missile troops, these units are generally well able to look after themselves in combat against lightweight enemies.  Heavy cavalry and infantry will roll right over them, but the dual ability of fire and then close and attack in a melee makes these forces useful in many situation
INFANTRYInfantry here is a catchall term for the men-at-arms and warriors who are the backbone of most armies.  They have no particular strengths, but no appalling weaknesses either.
HEAVY INFANTRYThese units are heavily armed, armoured and slow compared to their contemporaries, but their job is not to chase down the enemy..  Their job is to cut the enemy to pieces, and at this they are almost unmatched.  These troops are the expert at hard, bloody assaults.  When equipped with polearms, they can also reduce cavalry units to so much dog food.
PEASANTSPeasant class units are not very tough, nor are they likely to stand long when things start going wrong.  They are, however, cheap to build and they appear early in the game before the infrastructure to train better units has been constructed.  Not all peasants are equally bad though. Irish kerns and eastern woodsmen can be surprisingly effective as long as they arent thrown into head-on attcks.  the militia units have better equipment and training, but shouldnt be relied upon to fight as well as professional soldiers.
HEAVY CAVALRYAll of these troops are primarily intended to do one thing, attack and defeat enemies using shock as their primary weapon. Heavy cavalry are at their best when they can charge into an attack, but deciding when to order a charge can be a tricky business – give the order too soon and your units will become exhausted too soon.  but simply committing them to a charge may not be the best tactic, particularly against spearmen.  Aflanking or rear attack can be far deadlier.  There can also be problems in holding back some of these troops, as the more noble ones often impetuous in battle and eager for glory.

Kataphraktoi are some of the heaviest cavalry the world has ever known and while slow can have a tremendous impact when they do charge home.

LIGHT CAVALRYLight cavalry are intended to act as a screen, to ride down slow lightly armed enemies and to pursue a beaten foe from the field – killing and capturing as many enemies in the process as possible.  They are also extremenely useful against fast opposition, and can keephorse archers away from slower, more vulnerable troops. they cannot – and really should not – expect to hold their own against heavy cavalry
HORSE ARCHERSHorse archers are the best harassing troops available, able to pepper an enemy with missile fire then, hopefully, withdraw before any counter-attack can be executed.  This harass-withdrawal-harass cycle can be repeated as often as necessary to wear down the enemy and break up his formation.  Horse archers shouldnt really get involved in melee, except in self-defence and possibly when pursuing a broken enemy off the field.  Spanish Jinettes and Byzantine Cavalry are exceptions to this rule, and are competent attackers.
ARTILLERYArtillery pieces cannot move during a battle, so positioning them properly from start is vital.  If besieging a castle, they needto be within range of the defences, but not so close that they can be attacked by fire from towers.  In a defensive field battle, they need to be placed so that there is a beaten zone that the enemy will have to cross.  On attack, tempting the enemy into coming into the beaten zone of artillery fire is always a good tactic in an army that includes artillery, along with light cavalry or horse archers to act as goads.
GUNPOWDERAs a sub category of missile troops, handguns have all the utility you would expect.  They can be terrifying to enemies unused to them, but they are also useless in wet weather, when powder simply cannot be kept dry.

As with other artillery pieces, positioning guns on the battlefield is the key to success. Guns are quite effective during castle storming attempts and can do tremendous damage to attacking forces on other battles.  Positioning them properly is the key to success, sothat the enemy have few options but to come into range, like other gunpowder weapons, they are useless in wet weather.