I talked recently to someone who had come into a chunk of money, and asked me what I thought it was best to do with it. This is of course a good question to have to answer. I think it makes sense to do some planning and to try and strike a balance between enjoying your bit of good luck now, and benefiting from it in the future. My suggestion would be to do something along the following lines:
1) Pay off any high-interest debts, with the highest interest ones - almost certain to be any credit cards - first, then any other loans, apart from mortgage and student loans.
2) Once that is done, set up an emergency fund if you do not have one already, or top it up if you do. (As mentioned elsewhere, it is a good idea to have about six months' living expenses tucked away if possible.)
3) If you have done both of these and have some money left, I would designate some of the money for fun; a holiday, really nice meal out, home improvements, presents for your family, or whatever. The amount depends somewhat on how much money you have received, what your general financial situation is, and what you would like to do as a treat.
4) Next, you may want to look at your pension. For instance, if you are not paying the maximum into your pension to benefit from your employer's maximum contributions, it would be worth considering doing this for the future, and back-dating these contributions if you are allowed to do so. (If you work in the public sector you may be able to make additional contributions to your final salary scheme, which would be worth looking into, as this could make quite a difference to your final pension.) The advantage of doing this is that it should improve your pension situation in the long term. Because of the tax position of pensions, pension contributions are quite an efficient use of the money.
5) Another option, either as alternative or in addition to 4, is to consider paying off a chunk of your mortgage, although you should check first that you won't incur fees for doing so; this will probably depend on the amount of the planned overpayment, and the terms of your mortgage. Although interest rates are fairly low at the moment, paying off your mortgage will still reduce your outgoings and commitments generally, and will involve a greater monthly saving once interest rates go back up.
6) If that still hasn't used up your windfall then you are very lucky indeed! You may want to look at other investments such as stockmarket-based unit and investment trusts, and you may benefit from specialist investment advice at this point.