Pretty much like sovereign nations negotiating treaties.
Which is an apt metaphor, because neither Apple nor TSMC has the ability to force the other to do anything.
So, negotiations become a crawl to find a mutually-acceptable local optimum. Which ends up with both getting things they see as strategic priorities, while compromising on things they care about less.
Most of the dance is around figuring out what the other's strategic priorities actually are, and which concerns are secondary.
Or they have mutually-exclusove strategic priorities, in which case there is no deal.