You need to apply for it and have received your certificate before you have any clients as you are not supposed to trade without it. The form is available at the HMRC website and cost either £95 or £100, but if you are qualified you may be entitled to apply to the governing body of who you are qualified with.
When I called to register they advised me that you aren't even supposed to start to advertise until you are registered and the process takes around a month so dont leave it until the last minute like I did. I applied about a week into February wanting to start wef 1 March but they changed my date to the 1 April.
I am a member if the ICB and am covered under the MLR through them as they are a registered body. I beleive this is covered when you pay your annual fee and practice licence. So I dont need to go through the HMRC route.