Here's a more detailed explanation:
1. You blow into the trumpet. This causes the air in the mouthpiece to vibrate.
2. The air vibrations travel through the trumpet. As they do so, they cause the air inside the trumpet to vibrate in sympathy.
3. The shape of the trumpet amplifies the vibrations. The bell of the trumpet acts like a megaphone, amplifying the sound and sending it out as sound waves.
The pitch of the sound that is produced depends on the length of the trumpet and the tension of the player's lips.