Typical illegal moves are
- taking two consecutive moves without the opponent taking a move in between. (under practically all rulesets)
- immediate recapture of a stone in a ko. (under rules that use basic-ko)
- using a board play to recreate a previous position. (under rules that use positional super-ko)
- a board play that leaves one of your own groups without liberties while not capturing an opponent's group. (under rules that forbid suicide)
The ruleset in use will specify how illegal moves are handled. Typically a illegal move will result in either a forfeited game or a reconstruction of the position preceding the illegal move followed by an involuntary pass by the offending player.
On 2nd Oct. 2003 Cho Hunhyeon played an illegal move in a major tournament game and had to forfeit the game.
It's easy to make this kind of blunder if a ko is involved. Most likely Cho's mind was preoccupied with counting and evaluating ko threats, and he failed to pay due attention to the trivial task of taking the ko.
Something similar happened a few years ago in the Meijin tournament in Japan, where Cho Chikun took a ko without making a threat. But on that occasion the game was annulled rather than forfeited, since Cho had asked the referee if it was his turn to take the ko and the referee had answered wrongly.
- the discussion about hard-heartedness.
 Here, the ko may look far-fetched but it is actually playable : it is a Yose Ko, of course, but if Black can win it, and he has many ko threats, as his whole left group is dead as it stands, this will resurrect the left group. That would put Black very much ahead ... except White will have played 3 moves in a row elsewhere.