What happens when both parties breach a contract?

Breach by both the parties, will put the contract to an end. Thereafter right to claim will arise in accordance with the damages suffered by the parties.