Trumpets and cornets often play the same music to the extent people confuse the instruments. The trumpet and cornet differ, however, in terms of shape and size, tone and mouthpiece shape. The history of the two instruments also is very different and has impacted composition for them.
The primary difference between the two instruments is the tubing. The length of the tubing in the trumpet and cornet is virtually identical, which is why both instruments are in the same key and can play the same sheet music. The tubing of the cornet, however, has more bends and curves in it. This makes the cornet physically shorter than the trumpet, which is why some students find starting on the cornet easier.
A second difference in the tubing of the trumpet and cornet is the overall taper. In a cornet, the internal chamber of the tubing, or bore, is conical. This means that the bore widens out more gradually before it gets to the bell. The trumpet, by contrast, is mostly cylindrical, having the same diameter for most of the tubing.
As a result of the higher number of curves in the cornet, players typically find that there is greater air resistance when playing. This increased air resistance, along with the conical bore, gives the cornet a much mellower sound compared to the trumpet. The difference in tonal color is significant enough that some composers are very specific about whether a cornet or trumpet should cover a part. In general, when a soprano brass instrument is needed in an ensemble, people prefer trumpets in orchestras and cornets in brass bands.
Another difference between the two is the shape of the mouthpiece. Trumpet mouthpieces traditionally are larger and narrower than the mouthpieces used for cornets. Some trumpet mouthpieces, however, are shaped quite similarly to those for cornets. The purpose for abandoning the traditional shaping was to abandon the mellower cornet tone so that the cornet could be brighter and compete more readily with the trumpet. Older cornet mouthpieces also were more difficult to manipulate in the upper register or at higher dynamic levels.
Historically, although versions of the trumpet have existed in some form for thousands of years, the modern trumpet came about from the valveless "natural" trumpet of the baroque period, which was roughly from 1650 to 1750. The cornet, which has a comparatively brief history, came about in the early 1800s when people added valves to the post horn, a normally valveless, circular-shaped brass instrument used to signal the arrival of a mail carrier or coach. Trumpets eventually adopted valves, too, but they were slower to do so. The added facility gained through the valves translated into cornet parts becoming more elaborate and flashy, whereas trumpet parts tended to be more melodic. This, combined with the tonal difference, is why many composers wrote separate parts for the trumpet and cornet into the 20th century.