Here is a more detailed explanation of the physics of how a trumpet works:
The player's lips form a seal around the mouthpiece, and they then blow air into the instrument. This air creates a disturbance in the atmosphere inside the trumpet, causing the air pressure to fluctuate. These fluctuations in air pressure cause the sides of the trumpet tube to vibrate, which sets up a standing wave inside the instrument.
The standing wave in the trumpet tube consists of a series of nodes (points of minimum vibration) and antinodes (points of maximum vibration). The distance between two adjacent nodes (or antinodes) is half the wavelength of the sound wave.
The frequency of the sound wave (and therefore the pitch of the note) is determined by the length of the trumpet tube. The longer the tube, the lower the frequency and the pitch of the note.
The shape of the trumpet's bell also affects the sound by reflecting and focusing the sound waves. This helps give the trumpet its characteristic bright and piercing tone.
Trumpets come in a variety of sizes and shapes, from the small piccolo trumpet to the large bass trumpet. Each different type of trumpet has its own unique sound and tone quality.