Apparently this is done by "grafting," which one person explained as such:
"Grafting works by selecting two trees in the same family (let's say orange and grapefruit) selecting a healthy sizable branch from tree A with plenty of healthy leaves to ensure it can continue to photosynthesize when you attach it to the host tree. Next you cut into branch A (there's a particular way you're supposed to cut the grain) mirror that cut on the host tree and bind it with something called grafting tape that helps to bond the mew new branch to the host tree. If the branch is able to sustain itself until the bonding is complete and it starts receiving nutrients from the host tree, the graft will be successful, if not it will wither and die."