If you really want to know the nitty,gritty have a look at Richard Smith's technical papers here:
Smith Watkins
TM member Derek Rabean has also got lots of topics on 'Resonant Sound'. Do a search for his excellent posts and absorb.
A laymans thumbnail explanation is that sound in a trumpet is created by the transmission of a standing wave created along its length by the vibration set up in the mouthpiece. The efficiency of that wave will be determined largely by the design of the lead pipe and bell. The character of the resulting sound will of course be shaped by the physical characteristics (metal thickness, material etc) of the instrument's construction.
Resultant fundamental pitch is a function of the entire length of the instrument, not of the lead pipe. Cornets, for instance, have the same pitch as trumpets (being the same physical length) but generally much longer lead pipes. The standing wave interacts differently with the instrument in that case but the resultant fundamental is the same.
I'm no phycisist though and hopefully some of my more learned colleagues can correct and build on my effort.
Regards,
Trevor