This is from about.com. It tells about how your FICO score is calculated. Exactly how they get your number is a trade secret but you can get an idea from the following article:
Payment history is 35%
Lenders are most concerned about whether or not you pay your bills. The best indicator of this is how you’ve paid your bills in the past. Late payments, collections, and bankruptcies all affect the payment history of your credit score. More recent delinquencies hurt your credit score more than those in the past.
The amount of debt you have in comparison to your credit limits is known as credit utilization. The higher your credit utilization – the closer you are to your limits – the lower your credit score will be. Keep your credit card balances at about 30% of your credit limit or less.
Length of credit history 15%
Having a longer credit history is favorable because it gives more information about your spending habits. It’s good to leave open the accounts that you’ve had for a long time.
Inquiries are 10%
Each time you make an application for credit, an inquiry is added to your credit report. Too many applications for credit can mean that you are taking on a lot of debt or that you are in some kind of financial trouble. While inquiries can remain on your credit report for two years, your credit score calculation only considers those made within a year.
Mix of credit is 10%
Having different kinds of accounts is favorable because it shows that you have experience managing a mix of credit. This isn’t a significant factor in your credit score unless you don’t have much other information on which to base your score. Open new accounts as you need them, not to simply have what seems like a better mix of credit.
Source