In the UK, there isn’t a clearly defined internet domain name law since most of the legal framework is based on the law of contract. When you purchase a domain and agree to the legal terms and conditions, these usually bind you to a dispute resolution policy e.g. the ICANN Uniform Dispute Resolution Policy (UDRP). If someone claims you are using a domain for harmful purposes, and they win the case, the domain name can be transferred to them.
If you register a domain name which is similar to someone else’s this can be seen as an 'instrument of fraud'. If the UK court does consider the domain name to be a breach of intellectual property rights, the domain owner may have to transfer the domain name as well as be liable for and damages and costs.
Some countries, such as the US with its Anticybersquatting Consumer Protection Act (ACPA), have more specific domain name laws, which give specific legal rights to trademark owners.