Doubling was a standard drill movement both for infantry and cavalry. It refers to to process of halving a frontage by the left half moving behind the right.
If cavalry are advancing in a column of squadrons the left troop (half squadron) of each squadron slows down and then wheels in by moving diagonally behind the right troop. The principle works for the halving of any frontage, ie cavalry half squadron to division (quarter squadron).
Infantry had the same drill. If a column of companies wanted to decrease their frontage (so for example as to go through a defile) they could double by the left half company briefly halting (or marking time) then either marching diagonally or by turning to their right and file marching behind the right half company. Every company in the battalion could carry out the same movement simultaneously. It was also very much used when advancing in line. If there was any obstacle the blocked element would fall back, double behind its adjacent sub-unit to the right and once the obstacle was passed would resume its place in the line.
Cavalry could not file march because a horse is nearly 3 times as long as it is wide, so if the cavalry equivalent of file marching was (and still is for any mounted units such as the British Househiold Cavalry) to turn in "threes". You can also sometimes see it used in the old John Wayne U.S. Cavalry movies with the command "threes right".