CalicoJack is one of the forms of gambling available in the Casino. It is a modified version of blackjack. There are two tables playing the game in the casino, one low stakes (100 Qi coins bet) and one high stakes (1,000 Qi coins bet).
The objective is to score higher than the dealer without exceeding 21.
The player and the dealer are both dealt two cards, the first valued between 1 and 11, the second between 1 and 9. The dealer's first card is hidden while the player takes his actions.
The player can then choose to stay, keeping their current total, or hit, drawing a new card valued between 1 and 9. This is repeated until the player exceeds 21, a "bust", for an immediate loss; makes a total of exactly 21, a "CalicoJack", for an immediate win; or chooses to stay.
If the player stays, the dealer's hidden card is displayed. The dealer will then take additional cards (valued between 1 and 9) until they either bust, or have a total of 18 or higher that is at least as high as the player's total. If the dealer busts, the player wins; if the dealer has a higher total than the player but no greater than 21, the player loses; if the player and dealer have the same total, the game is a draw.
If the player wins they gain a number of Qi coins equal to their bet. if they lose, they lose their bet. If the game is a draw, no coins are won or lost.
Optimal strategy for the player is to stand on 18 or higher when the dealer shows a 9, stand on 16 or higher when the dealer shows a 5 or 6, and stand on 17 or higher against all other dealer upcards.
Using optimal strategy, the chance of winning a game of CalicoJack is 43.9%, giving the game a house edge of 12.1%. (This is about 20 times higher than typical real-life casino blackjack games.) If you play CalicoJack long enough, it is a statistical inevitability that you will lose all your Qi coins. If you are after the more expensive casino prizes, it's a better bet to just buy the coins than to try to win them.
(These results differ from pankosaur's analysis, which assumes dealer always stands on 18 or higher; this is not the case, at least not in the current version. Also, they assume that cards are dealt randomly; according to leuven's post on reddit, Luck does not affect the game.)