You will generally get a refund of your contributions but with two deductions:
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 take a transfer of 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.