Onboard credit should be showing immediately on your Sail & Sign account once onboard and can be used right away.
You can use it to pay for most things while onboard: shopping, drinks, Bingo, gratuities (as long as you did not prepay), WiFi (must be purchased onboard), excursions (must be booked onboard, be aware some excursions fill up even prior to the cruise so waiting to book once onboard may limit your options), Cheer's program (must be purchased onboard, you pay a higher price onboard so this way is not the most cost affective), etc.
Carnival says that you can't take the credit with you after the cruise, so what is left is lost. Some cruisers have reported being able to buy a Carnival gift card in the onboard shops using onboard credit making this a way to carry the credits over to another cruise ...if it works. This is not officially supported by Carnival.