Before deciding on what terms they will offer you a mortgage loan, lenders must discover two things about you: whether you can repay the loan, and if you are willing to pay it back. To assess your ability to pay back the loan, they look at your income and debt ratio. To assess your willingness to pay back the loan, they look at your credit score.
The most commonly used credit scores are called FICO scores, which Fair Isaac & Company, a financial analytics agency, developed. Your FICO score ranges from 350 (high risk) to 850 (low risk). For details on FICO, read more here.
Your credit score is a result of your repayment history. They don't consider income or personal characteristics. Fair Isaac invented FICO specifically to exclude demographic factors like these. "Profiling" was as bad a word when FICO scores were first invented as it is today. Credit scoring was invented as a way to take into account only what was relevant to a borrower's likelihood to repay a loan.
Deliquencies, derogatory payment behavior, debt level, length of credit history, types of credit and number of credit inquiries are all considered in credit scores. Your score reflects both the good and the bad of your credit report. Late payments count against your score, but a record of paying on time will raise it.
Your credit report must contain at least one account which has been open for six months or more, and at least one account that has been updated in the past six months for you to get a credit score. This history ensures that there is enough information in your credit to assign an accurate score. If you don't meet the criteria for getting a credit score, you might need to work on a credit history prior to applying for a mortgage.