An Illegal move is when a move is made that goes against the rules of chess or how pieces move.
An Example of an Illegal Move is shown below:


There are 2 thing’s that makes what happened Illegal in chess.
Below is another example of an Illegal Move:


What black did was an Illegal Move because making that move would put black in Checkmate, therefore the Rook would have to move back, and black would have to do a different move.