A prelude is a short piece of music for a musical instrument. It is called a prelude because it is supposed to be played before something else (Latin pre=before; ludere=to play).
Preludes come from the Renaissance period, when lutenists (people who played the lute) improvised (which means playing while making it up as they were going along) a simple piece before a concert so that they could check whether their instrument was in tune. During the 16th century, composers often wrote pieces which they called a “prelude” which was often a separate piece of music. These were often for lute, guitar or cittern.
By the early 18th century, the Baroque prelude was often a piece of music which was followed by a fugue. Johann Sebastian Bach wrote lots of pieces like this, which were called “Preludes and Fugues”. Most of them were for keyboard instruments such as the harpsichord or organ. Forty-eight of them are from a collection called The Well-Tempered Clavier, which was made up of two sets of twenty-four preludes and fugues that are each written in a different major or minor key signature. The first prelude, in C major, is very famous. It sounds like an improvisation made up of gentle broken chords like a lutenist might play. (This is the piece that Charles Gounod later used for his Ave Maria.) Preludes were also pieces which were followed by a series of dance movements (a “suite”).
In the Classical period, not many composers wrote preludes. More preludes were composed in the 19th century (the period of Romanticism). Frédéric Chopin wrote a collection of twenty-four short piano pieces which he called “Preludes”. Just like Bach's Well-Tempered Clavier, there is a prelude in every major and minor key signature, but unlike Bach's, these pieces are not meant to be followed by anything; they are just separate pieces of music that are often performed together. Some are not too difficult to play, but others are very hard (virtuoso).
Composers like Alexander Scriabin, Karol Szymanowski, Sergei Rachmaninoff, Claude Debussy and Olivier Messiaen wrote preludes in the style of Chopin. Other composers who wrote preludes included Felix Mendelssohn, Franz Liszt and Max Reger. There were also composers who were inspired by the music of Bach and started writing Preludes and Fugues, such as Dmitri Shostakovich, whose collection of Preludes and Fugues for piano are, just like Bach and Chopin's, written in all the major and minor keys.
There are also examples of 19th century composers who wrote short pieces for orchestra called “Preludes”. Sometimes, they wrote a short orchestral introduction to an opera which they called Prelude (or German: “Vorspiel”) instead of the usual word “overture”.