Before you can fix a credit score, you need to know what your score actually is. There are three major credit bureaus: Experian (www.experian.com), Equifax (www.equifax.com), and Transunion (www.transunion.com). Contact each bureau and request a report of you credit history. Get yourself a free report once each year and review for errors. Look for information and accounts that are not yours or are out of date. Each error must be disputed separately.
To dispute an error, first contact the creditor directly (not the credit bureau) and argue your case. If you can convince the creditor to remove that item from your credit history, get them to contact the credit bureaus and to give you a letter explaining the error. Keep all documentation (especially that letter) in case one of the credit bureaus does not remove the item or if they put it back on in a few weeks (which happens from time to time).
Of course foreclosures, deed-in-lieu-of-foreclosures, short sales, accounts paid late, accounts you owed and never paid, etc are supposed to be in your credit report. You can do your part by paying old debts or settling with the creditor (paying a smaller amount than the actual debt). If you settle, get the terms of the agreement in writing BEFORE you send them any money. Pay with a check (not a credit card or debit card) and keep the paperwork forever.
You should also make sure you are paying your monthly payments on time. Keep your balance on your credit cards at just over 25% of the limit amount. Do not max out your cards, do not pay the entire balance each month, and do not close any cards. Running a balance of just over 25% will make the most difference in improving your credit score
At any rate, you can write an explanation to any item in your credit history. You may want to explain why a certain item is there. It may be correct but there can be extenuating circumstance which you want creditors to take into consideration. The bureaus are required to send it to inquiring creditors along with your report.
SO THIS WON'T BE A PROBLEM IN THE FUTURE, SPEND LESS THAN YOU MAKE.