Firstly, what happens to my 401k if I change jobs?
It varies from 401k to 401k. Whatever happens you probably won't "lose" your money you'll be left with two options:
1) Cash out, this is not recommended since there are severe penalties, fees and taxes which you'll have to pay. Figure around 40-60%.
2) Roll over to your own private 401k with a company like Janus, Fidelity, Dreyfus, etc. or you can roll it over to your new employer's 401k and continue contributing there.
Secondly, if such need arises, can I withdraw anything from my 401k? Or is it untouchable until I retire?
Some 401k's (like mine) allow you to take out a loan of 50% of your vested balance which is really nice because 1) there was NO credit inquiry, 2) the interest rate for me was +2 above prime which is around 11% I think and 3) the payments are taken directly from my payroll making it a cinch to pay back.
When you leave the company you could cash out your 401k balance but be ready for severe penalties, fees and taxes.