The law that governs the contract is the law that determines matters like how the contract should be interpreted, and whether the parties have performed or breached their obligations.
It's always best to specify which country's law governs the contract in a choice of law clause. An English party would usually want English law to apply, as well as wanting the English courts to have jurisdiction to decide on any disputes. However, it's possible (but not convenient) to have the English courts decide on disputes by applying the law of another country. In this case, an expert on the foreign law would have to give evidence in the English court of what that foreign law is. This would be more expensive than having an English judge apply English law.
If the parties don't specify which law should apply to a contract, there are default rules that would determine this, but these rules leave room for uncertainty.
Governing law choices made in UK contracts will continue to be respected by EU courts when they have to decide which law governs the obligations of each party.
If the parties to a contract choose the law of the country where one of them has their home, the courts will generally apply the law chosen. However, if they choose the law of a county that isn't connected to the contract in any other way, some of the laws of the country the contract is connected to ('mandatory rules') may also apply.
Special rules apply to consumer contracts where the seller or provider carries out business in or directs their activities to the consumer's country. If the law chosen in the contract isn't that of the country where the consumer has their home, the mandatory rules of the consumer's country will apply as well.
These mandatory rules are designed to protect the consumer. Examples in England are:
If the terms of the contract conflict with the mandatory rules of the consumer's country, the mandatory rules will override the contract terms.
If the parties haven't chosen the law of the contract, it'll be the law of the country of the party giving the performance that characterises the contract. In sale-of-goods contracts, this is the seller's country, unless it can be shown that the contract has a closer connection with another country.
If the seller is based in a different country from the consumer, the contract will be governed, in general, by the seller's law. However, if the mandatory rules of the consumer's home country are different from the seller's law, these will override the seller's law. The mandatory rules of the country hearing the dispute or the country most closely connected with the contract can also override the seller's law.
As with choice of jurisdiction clauses, it's always best for the parties to a commercial contract to put in an express term relating to the choice of law. However, a seller won't be able to avoid the mandatory rules of the consumer's home country intended to protect the consumer.