You've realized you have a problem - so you've taken the first step.
Some suggestions:
Get a program like Quicken, or keep a detailed ledger if you're a paper person. EVERY TIME you charge something, WRITE IT DOWN and subtract that $ amount from your checking account balance. When your balance gets too close to zero, stop buying!
Pay down your credit card debt. As you pay off your debts, cancel the cards, or call the credit card issuer and ask them to lower your credit limit, so you can't run them up so high. (I'm assuming you have revolving debt. If you don't, lower your credit limit now.)
Every time you make a charge, set aside the money to cover it. You choose how to do it - set aside the physical cash if you need to, or write a check to the credit card company, or whatever.
Do a monthly budget. List how much $ you have coming in (paycheck) and going out (rent, food, car payments, tuition, etc - things you must pay). Then see what's left. Save some, spend some; but don't spend more than you have.
Stay away from places, like the mall, web sites, etc. where you find you spend a lot of money.
And find something else to occupy your time with. Instead of going to the mall, go to the gym. Hang out with your friends. Whatever keeps you from spending wantonly.
HTH