First step, find out about your credit. By law you are able to request your credit report once a year for free. You can contact any of the credit bureaus and ask for your free copy of your credit report.
Your credit report is the greatest indicator of whether you should be able to get a loan, and what you'll pay for that loan. If you can get rid of any of the negative items, you'll be in a position to get a better rate, and be more likely to be approved.
It's often possible to pay off judgments before you apply for a mortgage, and if it at all possible you should pay off as many of your negative items as possible. Also make sure you are current on all of your credit obligations. Lenders really frown on foreclosures, late payments, judgments, and bankruptcy is the big loan killer.
It's best to bring your credit file with you when you apply for your mortgage, the last thing you want is for every lender you talk to pulling your credit as too many credit inquiries could pull your credit score down, and cause you not to be able to get your loan.
There's other documentation you should also have. You should gather your last two years tax returns, last two months of pay stubs and banking statements. The lender and the program you'll be using will have different levels of documentation required, and it's best to have as much of it gathered as soon as possible.
There are many different options to get a loan. There are mortgage brokers, banks, and credit unions. If you have an account at a local bank, you might want to start there. Take your credit file, and all your documentation and do not let them pull your credit until you decide to work with them. Understand that they win when they give you the loan, so make sure you stay in control of the process.
When you talk to a prospective lender you want to make sure that you connect personally with the lender's representative. That's the first step. And of course you want to make sure you're not paying too much. You'll need to get a Good Faith Estimate or GFE, which will give you a general idea of how much your new loan is going to cost you.
As long as you pick a good lender to work with chances are you'll have the experience you're looking for. But, of course that's the toughest part of getting a mortgage, they all look glamorous on the outside, but once you're too far in to back out that's when it can get ugly.