Thunderbird is built on top of firefox code.
The thunderbird executable contains the application main logic.
It uses Firefox binary libraries like xul (contains the GECKO web rendering engine, the XPCOM cross platform object model, etc), nss3 (network security services), mozglue ...
Thunderbird is made of specific components like: mail, calendar, chat, newsgroup...