A trumpet player can change pitches changing the position of his lips on the mouthpiece or pushing down one or more or the valves. When he pushes down on the valves the part of the tubing that is sounding is made longer so the pitch changes. Long ago trumpets and cornets were used during battles.
How do you change the pitch on a brass instrument?
Most brass instruments have valves attached to their long pipes; the valves look like buttons. When you press down on the valves, they open and close different parts of the pipe. You change the pitch and sound by pressing different valves and buzzing your lips harder or softer.