Bookers book the matches/segments and then the people who's characters are in the match/segment write it. For example, if Thewindyfan made a match between Adam's and Crayo's characters, Adam and Crayo write the match.
So lets say Crayo writes for Undertaker and Adam writes for HHH, and the description of the match is this:
Match - Undertaker vs HHH (Crayo & Adam)
Both men give it their all in a tremendous contest. Triple H tries his hardest to put away the deadman, but ultimately falls victim to a Tombstone Piledriver, scoring Taker the win.
The typical thing that would happen is Adam would start the match off, maybe do the first half, then PM the match to Crayo to finish, since Crayo's character (Taker) is winning. Then once Crayo is finished, he PMs it to the bookers, who put it into the show. And of course Crayo and Adam could send the match back and forth to each other if they wanted, but the usual way is one person writes the first half, the other person (usually the one who wins) writes the second half and turns it in.
Hope that helps.