When a suit is lead, each hand must follow suit if possible. Not doing so is called a "revoke".
If the revoking side play a card to the next trick then the revoke is "established", and play continues.
The revoke will be dealt with at the completion of play (see below).
Establishment of a revoke can be prevented. If the player who made the revoke realises they have revoked before their side play to the next trick, then they should speak up, call the Director, and they will be allowed to change their card. If they are Declarer then there is no further issue, play continues.
If they are a defender then the withdrawn card becomes a major penalty card and is left face up on the table. They must play this card at the first legal opportunity, and if their partner comes on lead then Declarer will be able to impose Lead Restrictions.
A player's partner can also prevent a revoke being established. If their partner doesn't follow suit then they can ask them if they are "having none ?", or you can say "no hearts partner ?" Defenders can ask each other, dummy can ask Declarer. ( In fact defenders can ask Declarer, and Declarer can ask a defender, though there is little benefit to this.)
When a revoke has been established, by that player's side playing a card to the next trick, the revoke cannot be undone. Play must continue until all tricks have been completed. (unless the revoke is on the 12th trick.)
Now the Director will do a rectification by transferring tricks to the other side, so the result must be clearly agreed. Depending on the circumstances of the revoke, the Director will transfer zero, one or two tricks to the non-offending side, and may even decide to award more tricks (damage).
The Director asks :
Did the revoking card win the trick ? It must be a trump, so we have to be in a trump contract.
Did the offending side win any subsequent tricks, tricks after the revoke ?
For each of these questions, if the answer is Yes, then one trick is transferred.
The Director will then announce how many tricks are to be transferred, and thus the new final result. The Director should then offer the non-offending side the opportunity to claim more tricks if they feel the revoke further damaged their play of the hand (e.g. Declarer was cut off from a long suit in dummy).
If the players disagree about the revoke, or the circumstances of the revoke, then the Director will ask them to quickly replay through all the tricks, arriving at the critical tricks(s), and then examine the remaining cards.
This is important to resolve any dispute, so keep your cards in order.