The most important thing is to pay off any credit debt you have.
All factors that affect credit, from least important to most:
1) Don't apply for too many credit cards. This is a low impact on your credit and makes a small difference. Ideal amount is no more than 3. Most of these credit inquiries expire after 2 years.
2) Have more accounts. The more the better... 21+ is considered excellent. These don't have to be open accounts, they are factor by the total number of accounts you have had in your lifetime. Student loans, if you have any, are applied to this. I have an excellent rating with this factor just because of my student loans.
3) Don't close unused credit cards. The longer you have an open account, the better. If you have a credit card, keep the account open.. you don't have to use the credit card (although you should check the terms of the card to be sure the account doesn't close after an extend time of inactivity.)
4) Don't let accounts get sent to collection agencies. Derogatory marks like these have a high impact on credit score.
5) Make payments on time. Don't be later. Payment History is a high impact factor as well.
6) Most important factor is credit card utilization which is total credit balance you owe on all accounts divided by the max credit limit of all your accounts. 0-29% is best> Higher than 30 is considered fair.
Don't want to advertise, but Credit Karma has been a great resource for me. I was able to raise my score from 590 to 700 in just a couple of months using their information and recommendations. Again, not advertising, just giving advice on what helped me the most.
Hope all goes well for you!