Overtures usually have tunes which are going to be heard during the opera or ballet. In this way it prepares the audience for what is to come.
Many overtures in the 18th century were simply background music to get the audience's attention (people used to chatter during performances). Some composers like Gioacchino Rossini (1792-1868) used the same overture again and again for his next operas, or just changed bits of it.
Composers like Christoph Willibald Gluck and later Richard Wagner (1813-1883) were very careful to make the overture a dramatic beginning which prepared the audience for the story. Wagner often called his overtures "Vorspiel" (Prelude).
In the 19th century many Romantic composers wrote concert overtures. These pieces did not belong to any opera or ballet, they were just written to be heard at concerts. They often had a descriptive title because they told some sort of story, e.g. Felix Mendelssohn (1809-1847) wrote an overture "Fingal's Cave" which describes the sea coming into the cave in the Hebrides islands. Sometimes these descriptive pieces were much longer than an overture (which is usually just a few minutes), so they were called tone poems.
Overtures are usually played in sonata form.