As others have said, you use it for any and everything you purchase on board: tips, excursions, shopping, spa, drinks. Your onboard account is really like a bank account for the trip... the on board credit is just money sitting in your account when you get onboard. You settle up at the end of the cruise and any amount not covered by your on board credit comes from you in some form or another.
Oh, and for what it is worth, I would suggest traveling with 2 credit cards. We were on the Freedom of the Seas last year, and while we were onboard, someone decided to use my credit card without my knowledge. Well, my card was fine when I got onboard, but by the last night of the cruise, my bank had blocked the card so it could not be used. If I had not had another credit card to give them to settle my account, I might still be washing dishes on there.