The age of your credit history is an important determinant of your overall credit score, which means that closing your oldest credit account could hurt your number.
How to repair the damage: maintain your oldest account
If you've been on a spending spree recently and you plan to close accounts to avoid future temptation, then good for you! Reducing your available credit is an excellent strategy to avoid future problems with debt. That said, you should keep your oldest credit account open, since the length of your credit history has an impact on your credit score. Rather than cancelling that student credit card you've had for 10 years, perhaps convert it to a rewards card or something similar instead.
Your credit score is an important part of your financial profile, but it's also fluid: it rises and falls depending on how you manage your debt. Your credit score may be low now, but if you follow the tips above, you'll be well on your way to boosting your score.