Normally, the quantum of damages payable is assessed by a court when a case comes to trial. But sometimes the parties to a transaction want to work out in advance exactly how much should be payable as damages in the event that a claim should arise. When the quantum of damages is worked out and agreed to in advance by the parties, the damages are referred to as 'liquidated damages'.
A penalty clause in a contract is one which stipulates that a sum of money is payable in the event of a breach of contract, but the sum payable amounts to a punishment rather than a genuine estimate of the likely loss.