Congratulations for avoiding foreclosure! As far as how difficult it will be, it depends on how much damage was done to your credit while you were behind. Try to get a copy of your credit report from one of the places that actually tells you your score (the free reports you get from the credit bureaus don't include a credit score). If you can find out what your score is, you'll have a better idea of how much work you need to do.
The best thing to do if you want to buy a house is to find a mortgage broker (not lender) to work with on getting you qualified. Mortgage brokers only get paid if they get you financing, so they will often tell you what you need to do to qualify if you don't qualify when you first apply.
As for rebuilding your credit, here are a few tips:
- Pay EVERYTHING on time from here on out.
- Try to keep the amount of debt on your credit cards to 30% or less of the credit limit. This can make a huge difference in your credit score.
- If there are any negatives on your credit report that you're not sure belong there, dispute them. All you have to do is write a letter to the credit agency stating why you don't think it is legitimate.
- Listen to what the mortgage broker tells you above anything you read online. Most of them are up to date on the latest changes in the mortgage industry, so what they tell you more likely to be correct than what you hear elsewhere. Their livelihood depends on it.