People have been putting instruments together in various combinations for as long as there have been instruments, thousands and thousands of years. But it wasn't until about the last 400 years that musicians started forming into combinations that turned into the modern orchestra.
In the old days, when musicians got together to play, they used whatever instruments were around. If there were three lute players, a harp, and two flutes, then that's what they used. By the 1500s, the time known as the Renaissance, the word "consort" was used to mean a group of instrumentalists, and sometimes singers too, making music together or "in concert".
Early Renaissance composers usually didn't say what instrument they were writing a part for. They meant for the parts to be played by whatever was around. But around 1600 in Italy, the composer Claudio Monteverdi liked things just so. He knew just what instruments he wanted to accompany his opera Orfeo (1607), and he said exactly what instruments should play: fifteen viols of different sizes; two violins; four flutes, two large and two medium; two oboes, two cornetts (small wooden trumpets), four trumpets, five trombones, a harp, two harpsichords, and three small organs.
You can see that Monteverdi's "Renaissance orchestra" was already starting to look like what we think of as an orchestra: instruments organized into sections; lots of bowed strings; lots of variety. In the next century (up to about 1700, J.S. Bach's time) the orchestra developed still further. The violin family, violin, viola, cello, and bass, replaced the viols, and this new kind of string section became even more central to the Baroque orchestra than the viols had been in the Renaissance. Musical leadership in the Baroque orchestra came from the keyboard instruments, with the harpsichordist, or sometimes the organist, acting as leader. When J.S. Bach worked with an orchestra, he sat at the organ or harpsichord and gave cues from his bench.
In the Baroque era, a musical director occasionally stood and conducted, but not in the way we're used to seeing. Jean-Baptiste Lully, who was in charge of music at the French court in the 1600s, used to pound out the beat for his musicians using a sort of long pole, which he tapped on the floor. But once, he accidentally hit his foot, developed gangrene, and died!
In the next century, the orchestra changed a lot. This takes us up to 1800, Haydn's and Beethoven's time. The strings were more important than ever, and the keyboard instruments had taken a back seat. Composers began to write for the specific instrument they had in mind. This meant knowing each instrument's individual "language" and knowing what kind of music would sound best and play easiest on a particular instrument. Composers also began to be more adventurous about combining instruments to get different sounds and colors.
The first violinist, or concertmaster, led the orchestra's performance from his chair, but sometimes, a music director would lead part of a performance with gestures, using a rolled-up piece of white paper that was easy for the musicians to see. This led to the baton that conductors use today. And early in the 1800s, conductor-composers such as Carl Maria von Weber and Felix Mendelssohn actually began to stand up on a podium and conduct from front and center
As orchestras were getting bigger and bigger, all those musicians couldn't see and follow the concertmaster.
Later in the 1800s, the orchestra reached the size and proportions we know today and even went beyond that size. Some composers, such as Berlioz, really went all-out writing for huge orchestras. Instrument design and construction got better and better, making new instruments such as the piccolo and the tuba available for orchestras. Many composers, including Berlioz, Verdi, Wagner, Mahler, and Richard Strauss, became conductors. Their experiments with orchestration showed the way to the 20th century. Wagner went so far as to have a new instrument, the Wagner Tuba, designed and built to make certain special sounds in his opera orchestra. In one of his symphonies, Strauss wrote a part for an alphorn, a wooden folk instrument up to 12 feet long! (The alphorn part is usually played by a tuba.) And Arnold Schoenberg wrote a piece called Gurrelieder for a 150-piece orchestra!