there's quite a few different ways in the uk, this is how I got mine:
I'm over 21 (27 when I did this), and have held a a full car licence for several years
1) Ensure you have provisional motorcycle entitlement on your driving licence (this entitles you to proceed to step 2)
2) Pay about £100-120 for a CBT (compulsory basic training), this consists of a day of mixed practical and theoretical lessons. Teaching you the very basics of the highway code, motorcycle control, and how not to die basically. It finishes with 2 horus of on-road riding, usually on urban roads. Most people sit this on a 125cc bike, but some schools let you sit it on a larger machine if you are over 21, and are going to do DAS. I pulled a wheelie by accident on my 125, so wouldn't have liked to do that on a 500!
Since I have a car licence I could also ride a 50cc moped with no L-plates. The cbt allows you to ride any 125cc bike restricted to about 13bhp provided you are 17 or over, and display L-plates.
3) DAS training, there's no minimum, but most people need about 4 days of training. Lessons cost about £150/day. I did about 2 days training on a 125 until the instructor was happy to put me on a CB500. Normally 1 or 2 pupils per instructor, and it's all on the public road, apart from the mod 1 training.
4) Theory test, (£31?), this consists of 50 questions about the highway code, and a hazard perception test, were you click the screen if you see a hazard.
5) Mod 1 test, £15 (+ bike rental fee from your school adds another £75), this is an off-road practical test. You have to walk your bike backwards from one spot to another. Perform 2 figure of 8's, a U-turn (7.5m wide i think), emergency stop, swerve test, slow ride (walking pace). You're allowed 5 minor mistakes, putting yoru foot down etc is a major and an instant fail. Forgetting observations is a minor.
6) mod 2 test, £75 + bike rental fee again, this is an on road ride with an examiner following you in a car or on a bike, it lasts about 25mins. When I did it they had a number of prescribed test routes that each centre would use. My examiner only knew 3, and 2 of them had heavy traffic, so we all ended up using the same one that day (and had also practiced it in the morning luckily!)
7) Assuming you pass all that you are free to ride. There's various time restrictions on each test, a pass only lasts for 2 years, so you have 2 years from passing your theory to pass your mod 1 and mod 2, or you have to sit them again.
Note mod 1 and mod 2 must be sat on a bike capable of 46.6bhp or more in order to get an unrestricted licence. Any lower up to a minimum of 125cc and you will get a restricted licence, which only allows you a bike of up to 33bhp for 2 years, after which you are unrestricted. You need to be over 21 to sit the unrestricted licence, and to train on anything larger than a 125cc bike. You need to be over 17 to get a bike licence, but at 16 you can get a 50cc moped.
The new european guidlines are even more complicated, with more types of licence, power to weight restrictions, more age restrictions, and a longer wait to getting a full licence