On debarkation morning you will find a printout of all of your charges during the cruise either slipped under the door or tucked in the message slot outside the door. If you agree with them and used a credit card to secure your shipboard account, then there is nothing you need to do. They will bill that amount to your credit card.
If you used cash to establish your account, you will have to pay them for any shortage prior to leaving the ship. If you didn't use all of the cash, they will issue a check for the balance.
It is a good idea to check on your spending at least once or twice during the cruise, and to get things squared away on the day before the cruise ends if you are using cash. The line at guest relations is usually quite long on debarkation morning and if you can avoid it you need to do so.
Beer on Royal Caribbean: $4.25 to $5. Mixed drink: $5.75. Wine: anywhere from $4 to $12 a glass depending on the wine. Add 15% to each drink for the automatic gratuity charge.