Since Z is common in all 3 marked cells and has to be in one of these 3 marked cells, it is eliminated from all the buddy cells to these 3 marked cells. Lets take a look at the example below.
Cells, R4C2, R4C4 and R6C4 form an XYZ-Wing with R4C being the cell with possiblity XYZ. Here the value of Z is 2. Cell R4C6 is highlighted since it is buddy to all the 3 marked cells. (same row as R4C2 and R4C4, and same box as R6C4. Since the number 2 has to be in one of the three marked cells, it is eliminated from R4C6.
Normally, an XYZ wing looks very similar to Naked Triplets. The big difference being that in Naked Triplets
all three possibilities are removed from the Buddy Cells, whereas in the XYZ Wing, only the common number is eliminated.