XY Wing is an elimination technique by using a combination of 3 numbers. Lets say the 3 numbers are X,Y and Z. Now take a look at image below.
There are 3 cells each with a combination possibility of X,Y,Z. R1C5 has a possibility of X or Y. R2C4 has possibility XZ and R1C7 has possibility YZ. note that the cell containing XY is a
buddy cell to both XZ (Same Box )and YZ (Same Row). Cells which are
buddy to both YZ and XZ are highlighted in yellow.
Now if R1C5 if value is X, the number Z has to be in R2C4. If R1C5 is Y then Z ha to be in R1C7. So either ways Z has to be in either R1C7 or R2C4. Hence the number Z cannot be in the highlighted yellow cells. Now let us take a look at an actual example.
The cells R2C2, R2C4 and R3C1 form an XY Wing, where R2C2 is the cell with possibility XY. Irrespective of what the value of R2C2 is, 6 will always be in either R2C4 or R3C1. The highlighted yellow cells are buddy cells to both R2C4 and R3C1 hence 6 can be eliminated from these cells.
Coincidentally, if we look at R3C4,R3C5 and R3C6 they form
Naked Triplets