In a nutshell
Losing on the spot by playing a move that breaks the rules.
In detail
Retaking a ko immediately, playing on an illegal point, or playing 2 times in a row when it's the opponent's turn are all fouls, and under Japanese rules they mean a loss by foul.
It occasionally happens even in professional official games and can make big news. Sometimes a player slips up under byoyomi pressure.