Every technique up to this point looks at one row, column, or box at a time. X-Wing is the first one that asks you to track a single digit across the whole board at once — two rows and two columns together, none of which necessarily share a box.
The pattern
Pick a digit and find two rows where it has exactly two remaining candidate cells each. If those four cells line up in exactly two columns — the same two columns in both rows — you’ve got an X-Wing. The digit has to go in two of those four cells, one per row, and because of how the columns line up, it’s now accounted for in both of those columns. Every other cell in those two columns can have the digit eliminated, even in rows that have nothing to do with the original two.
(The same pattern works column-first instead of row-first — two columns with exactly two candidate cells in the same two rows.)
Worked example
7 forms an X-Wing between rows 3 and 7 across columns 1 and 9, clearing 7 from the rest of those columns.
The eliminated cells can be anywhere in those two columns — a completely different part of the board from the two rows that formed the pattern. That’s what makes X-Wing feel like a jump in difficulty: you’re no longer reasoning about one neighborhood of the grid, you’re reasoning about a shape drawn across it.
How to find one quickly
For a digit you suspect is getting hard to place, go row by row and note which rows have exactly two cells left that could take it. The moment you have two such rows, check whether their candidate cells share the same two columns. If they do, scan down both columns for any other cell that still lists the digit — those get eliminated.
Related techniques
Swordfish is the same idea with three rows and three columns instead of two. If X-Wing and swordfish both come up empty, XY-Wing looks at the problem a different way entirely — through chains of cells rather than lines.
Puzzles at Expert are built around needing exactly this and nothing harder.