Illegal moves and the touch move rule
On chess.com the computer does not allow you to make illegal moves. But in OTB chess matches, there is no invisible force field that prevents players from making illegal moves, so games at club level sometimes do have illegal moves played in them.
In this game I am white, and I just played Qc3+. My opponent did not notice he was in check and responded with Qe7.
The touch move rule states quite simply that if a player touches a piece that can be moved, the player then must move that piece.
Of course with the king in check, the only legal move available to the queen was Qd4, which simply blundered the queen after I then played Qxd4, winning a queen for nothing, and the end came a few moves later via checkmate.
Having thought about the incident since, I reflected that I was right to insist on the Queen being played to d4, and that my enforcement of the touch move rule was exactly what I should have done. Indeed I would do the same again, if the same situation happened again.
This just shows the possible consequences of playing an illegal move, namely the requirement to move the piece making the illegal move.