How does a trumpet work?
The trumpet is a transposing instrument which means that when the trumpet player plays a written C, the note that comes out in concert pitch (same as the piano) is the key name of the trumpet. So, if a Bb trumpet plays a C then the note that comes out would be a Bb on the piano: if an Eb trumpet plays a C then the note that comes out would be an Eb on the piano.
This is complicated but it’s not anything to worry about. All teachers, composers, and arrangers of music make sure that the parts for the trumpet work properly with all the other instruments: just make sure you’re using proper Bb trumpet music when you want to fit in with other instruments.