People visiting the UK for private medical treatment require a Standard Visitor Visa.
This enables you to stay in the UK for up to 6 months.
You need to show that you are obatining private medical treatment and that you will return to the country after the treatment is finished and that you have sufficient funds to support yourself in the UK.
The earliest you can apply is 3 months before you travel and you will usually get a decision within 3 weeks of making the application.