If your serious about competing, the best thing you can do is join your local motor club, also check out
www.msauk.org it should answer a lot of your questions.
(The MSA is the UK's governing body for motorsport, and they issue all licences).
If you want to race or drive in stage rallies you have to do the ARDS (race) or BARS (rally) course which is a couple of hundred quid (not sure on the exact costs as I've not done them).
For sprint/hilclimb events you only need a "National B Non Race" licence, which means that you don't need to go to a race circuit and do the ARDS course (a Nat B NR licence costs about £38 a year).
I hope that helps a bit! It is quite daunting to start with, but like I said, if you join your local Motor Club tere will always be someone who can help you out.