This can be a confusing topic, so let me begin by saying a bit about the concepts of “pitch reference points” and “root notes”.
First, “pitch reference points”. If you play a musical instrument like a piano or guitar, you are used to playing in what is called “concert pitch”. The reference point for notes on your instrument is usually considered the note “C”. But actually, if you were tuning a piano you would begin by adjusting the “A” above middle “C” to 440 hz.
Once that reference point is properly tuned all the other keys fall into place.
A guitar (for example) uses the same note values as a properly tuned piano. In other words, “C” on the guitar should have the same pitch as “C” on the piano. The physical structure of the guitar – the length of the neck and the physical properties of the strings, as well as how the strings are tuned relative to each other – these physical characteristics of the instrument determine how it is tuned.
The “A” string, for instance, is tuned to 110 Hz (two octaves below A above middle C on the piano – 110-220-440 – each higher octave vibrates at twice the frequency of the previous one). This means that C on the A string will be at the third fret. And the rest of the strings are tuned accordingly.
Reference points and “root” notes of horns
With an instrument like a trumpet the story is slightly different, but the principle remains the same. Once you find a reference point the rest falls into place. On a horn like a trumpet the reference point is the pitch of the note played with no valves depressed. This is what is often called the “root” note of the instrument. We call that note “C”, but in fact it corresponds to a “Bb” on the piano or guitar or violin.
That is why the trumpet is called a “Bb instrument”. The physical structure and length of the tubing in a normal Bb instrument results in that instrument having a “natural” root note of Bb. That is the pitch of the note you hear when you just blow into the instrument and don’t press any valves.
You could make that reference point higher or lower by changing the length of the tubing used in the horn. And that is exactly what happens with different sized instruments of the same family: smaller trumpets, for example, like the C trumpet, or different sized saxophones. Each of these different sized instruments has a different natural root note.
As a matter of convenience, in order to make the playing of instruments a bit easier, musical convention has agreed that we will call the root note open position on the trumpet a “C”, regardless of whether this is a Bb trumpet or a C trumpet. This means you can use the same fingering pattern on any sized trumpet. The same thing goes for different sized saxophones.
But even though different horn players go about their business as though they are playing the same note, the root notes are actually different. When a C trumpeter plays an open note it corresponds to a C on the piano. When a Bb trumpter plays an open note she is playing a note that corresponds to a Bb on the piano.
To allow these differently tuned instruments to play together, composers must “transpose” the parts to make up for the different tunings. If the piano part for a particular song is written in “C”, the accompanying trumpet part is written in “D”, and the alto saxophone part is written in “A”.
Just to repeat, this allows a saxophone player to jump from an alto sax to a tenor sax without having to use a different fingering system. When she is playing the piano or violin a note shows on the score as “C”. On the tenor sax it is written as “D”, and on the alto sax it is written as “A”. But the notes all have the same pitch.
In a formal group like a dance band or orchestra it is up to the composer and the arranger to figure this all out and give the band members the correct parts. The musicians just play what they’re given as though they’re all reading from the same score.
In a less formal group like a rock or soul band where the parts are often not completely spelled out, it may be up to the horn players to transpose their own music – often on the fly. With practice it is not as difficult as it sounds.