Most lenders use scores built from the information in your credit reports. The exact formulas are proprietary, but the main factors are well known.
1. Payment history
This is the biggest factor. Paying on time, every time, matters more than anything else. Setting up autopay for at least the minimum due prevents accidental late payments.
2. Amounts owed (utilization)
This is how much of your available revolving credit you are using. Keeping balances below 30% of your limits helps, and lower is better. It is also the factor that can change fastest, because utilization is recalculated each time a new balance is reported.
3. Length of credit history
Older accounts help. Think twice before closing your oldest card, especially if it has no annual fee.
4. Credit mix
Having both revolving credit (cards) and installment loans (auto, student, mortgage) can help a little. It is not worth taking on debt just to improve your mix.
5. New credit
Several applications in a short period can lower your score temporarily. Rate shopping for a single mortgage or auto loan within a short window is usually treated as one inquiry.
Check your reports
You are entitled to free credit reports from each of the three major bureaus through AnnualCreditReport.com. Review them for errors and dispute anything inaccurate.