The horn's earliest known ancestor is a Norse battle horn, which was used as early as the 13th century has a shape more like a tuba. Sometime in the 16th century, this instrument migrated into France, and a modified version shaped more like the horn we know of today (with tubing that runs in a circle and a flared bell) appeared, and was used for signalling during hunting. This horn had a high, clear pitch that could carry for long distances, but its sound was harsh and not fit for a concert hall. In the late 17th century, Count Anton von Sprock, an eccentric German noble, heard the horn played during a hunt, and paid for a couple of people to be trained in the instrument. This began the horn's transition to a concert instrument.
The horn gradually was modified, through introduction tubing that got wider the farther it got from the mouthpiece and through modification of the metals that were used to make the horn, and transitioned into the Natural Horn. The Natural Horn was originally just used for as a special addition to the orchestra, but during the early 1700s composers began to include horn parts in most pieces, and the Horn became a part of the standard orchestra. The main difference between the Natural Horn and the modern Horn was lack of valves.
Since the Horn's partials are so close together, it is possible to get many different notes without modification of the instrument's length through valves. However, the Natural Horn could only be played in one key, and to avoid having to switch instruments in the middle of a concert, players began using crooks, which were pieces of tubing that the hornist would attach to the lead pipe, changing the length and modifying the key. The valves were invented in the early 19th century, and as early as the 1820s valves were integrated into Horns.
However, at this point the only valve that was used was the Piston Valve, similar to the valves of the Modern trumpet. On the horn, these valves were very awkward, and did not gain very many supporters. In the 1860s, though, the rotary valve was invented. These proved to be a much better match for the Horn, and they are still used today. Using valves produces a slightly different sound, though, so for older pieces many players still use Natural Horns.
Horn players switched to the valve very slowly. Even halfway into the 20th century, some schools mandated study of Natural Horn, and refused to accept valved horn players. However, at this point all Conservatories will train students to use the valved horn, although some still require students to learn Natural Horn along with the Valved Horn.