If every cell in a house that can take a digit also lies in a second house, the digit must go in that shared part. The rest of the second house cannot have it.
A diagonal crosses three boxes and every row and column, so it locks against all of them: a diagonal can lock a digit into a box or a line, and a box or line can lock one onto the diagonal.
Worked examples
3 positions from real Sudoku X puzzles on this site, the familiar case first. Step through each one: the board lights what each step talks about, and the arrows show what rules what out.
A box and a line, as in Classic
In box 4, find every cell that can still take 8.
A diagonal locks a digit into a box or line
Start on the lit diagonal. It is a house, so its candidates for one digit can lock.
A digit locked onto a diagonal
This time candidates are eliminated along the diagonal. It counts like a row.
Where it fits
MediumLocked Candidates is a Medium technique: Medium Sudoku X puzzles are the first to need it.
The Classic Locked Candidates lesson teaches it on a plain 9×9 board. The Sudoku X overview explains the rule and the levels.
Locked Candidates in the other styles: Jigsaw, Thermo, Windoku, Arrow, Kropki.
Try it on a Medium Sudoku X puzzle. Next Step points it out when it is the move.