A cornet is a brass instrument that looks like a smaller, wider trumpet. The cornet used to be a common feature of jazz bands, until it was replaced by the trumpet.
The cornet sounds similar to a trumpet, but softer and mellower. This difference in tone or timbre is why a cornet can't usually be played as a substitute for a trumpet (or vice versa), even though they are played in the same way and at identical pitches. They simply sound different. The word cornet comes from the original cornet-à-pistons, or "cornet with valves," and the Latin cornu, "horn."