Mounted infantry were soldiers who rode horses instead of marching, but actually fought on foot with muskets or rifles. The original dragoons were essentially mounted infantry.
With the invention of accurate and quick firing repeating rifles in the middle of the 19th Century, cavalry started to become increasingly vulnerable. Many armies started to use troops which could either fight on horseback or on foot as circumstances dictated. Fighting on horseback with swords or lances would allow rapid movement without cover from enemy fire, whilst fighting on foot with rifles allowed them to make use of cover and to form defensive lines.
The distinction between cavalry and mounted infantry was in practice somewhat vague, but the mid-19th century onwards some cavalry units in the American Civil War, the Boers in the Boer Wars and others usually fought as mounted infantry. The first mounted infantry units (and named as such) were raised during the American Civil War and others followed, for example in Australia in the 1880s. Terms such as "mounted rifles" were often used.
As a response to their experience in the Second Boer War, the British Army copied the Boers and created their own mounted infantry in about 1901. Around that time, many European armies, most notably France, also raised cyclist battalions, which used bicycles in the same way that mounted infantry used horses. However they were handicapped by the need for proper roads.
Mounted infantry largely disappeared with the demise of the horse as a means of military transport in the 1930s and 1940s.
Countries with entrenched military traditions like Switzerland retained horse-mounted troops well into the Cold War, while Sweden kept much of its infantry on bicycles during the snow-free months. Germany deployed a few horse-mounted infantry units on the Russian Front during the Second World War, and cyclist units on both fronts as well, and both Germany and Britain (which had used cyclist battalions in the First World War) experimented with motorcycle battalions.
See also