csx
There are two things you need.
The boat itself needs a licence. These cost £20 per year. They are issued by Ofcom (I'll get you the address if you want it) Each year you pay your money and get a little licence disk for the port side window of your boat. Its very similar to a car tax disk.
Then you need an operators licence. This is a one off exam which is valid for life (at least it was when I did mine but things might have changed) These are typically run at yacht clubs, boat shows and marinas by the RYA (Royal Yacht association)
When I did mine the test wasn't too bad it was mainly to show you knew when to use mayday, and pan pan etc. Most clubs tend to run a one day course with the exam at the end of it.
Best of luck, I hate exams.
Regards
Osprey