The details vary according to the technology type of the trunking system, but in most cases, for a given site, the radio builds a table of channels in its memory when you first select the site. Each channel is a pair of freqs, one TX and one RX. There is a corresponding repeater at that site for each of those channels.
When someone wants to talk, their radio sends a request to the trunking controller, which then assigns one of the channels in the table and tells that radio, and any others that need to hear it, which channel to go to.
If you want to understand the details, study one technology type at a time or it will be confusing. P25, DMR (different flavors), NXDN (and IDAS), and maybe LTR are likely to be encountered in the wild.