In basic terms, cavalry are mounted troops, riding into battle on horseback. Their typical armament consists of a straight or curved sword or sabre used to thrust and/or hack at enemy infantry, artillery, or other cavalrymen. However, the term "cavalry" is a broad one, in fact describing two very different types of cavalry: heavy and light.
Heavy cavalry fulfills a role akin to the knights of medieval times. Armed with heavy sabers and mounted on large, muscled warhorses, they act as shock troops, charging headlong into enemy lines to sow havoc and confusion in their ranks. Units such as the Cuirassier and Garde du Corps of Wstern Europe and the Winged Hussars of Poland-Lithuania are prime examples of heavy cavalry.
Light cavalry, on the other hand, are somewhat more versatile. Commonly used as scouts and pickets, light cavalry could also be a formidable force on the battlefield, using their mobility to outflank enemy forces or run down fleeing opponents. Examples of light cavalry include Hussars, Lancers, and Light Dragoons.
Cavalry's effectiveness can be diminished by effective countermeasures. Light infantry and rifles are able to deploy stakes, a crude barricade which can kill onrushing cavalry by impalement (although the stakes break eventually after killing a certain amount of cavalry). Well-prepared ranged infantry can kill scores of charging cavalry before they even make contact, and most infantry are superior to cavalry in a prolonged melee thanks to their higher numbers and generally better defense values.