An illegal move is completed once the player has pressed the clock (Art. 7.5.1); The position immediately before the irregularity is reinstated; First completed illegal move: the arbiter gives two minutes extra time to the opponent (Art. 7.5.5)
Why people argue about this
People often think that once a move is deemed illegal, it's simply undone and play continues as if nothing happened. But they misunderstand that in FIDE chess, the position before the irregularity is indeed restored, but with a consequence: the player who made the illegal move gets two extra minutes added to their clock time, reflecting the unfair advantage gained from skipping the move.