Several routes, but it can be:
1) Join political party
2) Join uni section of said party
3) Volunteer and do stuff in constituency
4) Take up a research post with an MP using connections from 1, 2 and 3.
5) Stand for election to a local council
6) If good at 5, get selected to be prospective parliamentary candidate
7) If popular, get elected to be MP
8) If "pro-leadership", get appointed.
Or
1) Join political party
2) Join uni section of said party
3) Join trade union
4) Become branch officer
5) Become full-time officer
6) Get elected to NEC of union
7) Selected as PPC for a constituency
8) If popular, get elected to be MP
9) If "pro-leadership", get appointed.
Or
1) Join political party
2) Join uni section of said party
3) Join civil service (which has restrictions on political activities but you can be a member of a party.)
4) Transfer into Ministerial private office
5) Make contacts
6) Leave civil service to become full-time party worker
7) Selected as PPC for a constituency
8) If popular, get elected to be MP
9) If "pro-leadership", get appointed.
Or
1) Make lots of money in business
2) Join political party
3) Get selected as PPC for a constituency
4) If popular, get elected to be MP
5) If "pro-leadership", get appointed.
Or
1) Be born into wealthy family with lots of political links
2) Go to a well-known state or private school
3) Go to top university
4) Become researcher for party
5) Selected as PPC for a constituency
6) If popular, get elected to be MP
7) If "pro-leadership", get appointed.
Or
1) Make lots of money in business or make it big in another field
2) Join political party
3) Get awarded a peerage in return for being appointed a Minister
...and others
(edited due to IainC's eagle eye on a rushed post!)