Historically, Dragoons were line infantry that were trained to ride horses for mobility, then dismount to fight on foot. They most often were equipped with dragons (a shortened musket, also, hence the name "Dragoon") which was easier to use on horseback, the dragoons were usually used as a melee weapons if ever caught in a close quarters battle on foot. A sabre was used to fight other cavalry or infantry in close quarters when on horseback. Such events were rare in practice, unless charging. Dragoons were very effective in the 18th century being used as reinforcements if a battle ever went against a general.
In Pirates of the Caribbean, they are depicted as elite footsoldiers of the Royal Navy. They attack with their rifle butts and bayonets, but are far more dangerous than the average Guard or Veteran. They are great practice for anyone over level 32. Only an Officer is ranked higher.