Great question, and good proactive thinking. As a financial professional I help clients do exactly what you are asking about and more.
Before I answer your question I would like to recommend a great course in personal finance and you can sign up for one at www.daveramsey.com/fpu hopefully you will have one near you. I think that Dave Ramsey's strategy is very well thought out. Here it is...
First establish a $1,000 emergency fund. Which will now allow to pay for emergencies without getting into more debt, hopefully.
Second, start getting out of debt using the debt snowball method as fast as you can (if you have debt, other than a mortgage). This is super important.
Third, once you are debt free (other than mortgage) build up a "fully funded emergency" fund which is 3 to 6 months of your income. Once you are out of debt and have a fully funded emergency account, then you should start investing into mutual funds, IRAs, 401(k)s etc. The logic is this if you have debt payments at 18% which are guaranteed/for sure it makes no sense to invest in a mutual fund where you maybe earn 12% and it is NOT guaranteed. Basically once you are debt free and financially strong with a solid emergency fund. You will be in the best position to save for the future and do the rest of the financial steps that come later. Yes it will be hard, but it is definitely worth it.
Contact me if you have any questions.