You will generally get a refund of your contributions, but the tax relief you got on your contributions has to be repaid at a special rate of 20%. The Pensions Advisory Service provides more information on this.
It's easy to treat this refund as a windfall, and you may need it to tide you over before you find your next job, but you should bear in mind that the refund will only be the value of your own contributions and you will lose the value of the employer's contribution, so it may be very poor value.
If you are moving to a new employer, you should find out if you can transfer your pension into the new employer's scheme. Otherwise you may need to think about setting up a stakeholder pension and transfer the money into that.