It depends on the reason for ending the contract. If the reason is because of 'gross misconduct' (i.e. very serious misconduct), the law may allow dismissal without notice – that is, a 'summary dismissal'. Even if you are dismissed for gross misconduct, you may have a claim for unfair dismissal, particularly if there is no proper investigation and disciplinary hearing. If your employer was not entitled to end the contract immediately, you will have the right to bring a claim for breach of contract in an employment tribunal or a civil court.
If you are dismissed just before you acquire sufficient service to bring an unfair dismissal claim, the tribunal has the power to extend service by up to a week. You need two years’ service to bring most kinds of unfair dismissal claim.