The same with visiting any other country, to be able to visit the United Kingdom, you also need to have a valid visa. So, you should not forget to get a visa before the departure of yours to the country.
One of the tips to apply for a UK visa is to choose the right visa. There are several types of visas to visit the UK. This depends on the destination of the trip and how long you will stay. For example, if you want to migrate to the UK because of your spouse, then, you need to get a spouse visa. It means that you should also be able to pass the b1 test that you can know more on http://britishlifeskills.com as one of the requirements. It is important that you choose the right type of visa, as well as understand what is and should not be done with each type of visa.