The rake is the house fee that is charged to the game on a per hand basis. Usually, this fee is taken directly out of the pot as the bets are collected and grouped into it, after each round of betting. The rake is usually placed on top of the "drop box" on the table, so that when the hand is complete and the pot is pushed to the winner, the dealer can drop the rake down into the secured box beneath the surface.
The rake is the only way that the house (host casino) can make money directly on Poker (of course a casino can earn indirect revenue from players through food and beverage sales, etc.); the house is not wagering on the outcome of the game, so it has no vested interest in any particular result, and it does not have the "house advantage" that it typically has in other forms of gambling (e.g. Blackjack, where you bet against the house/dealer, but they have a statistical advantage).
The house will often also collect a separate "jackpot fee" to fund their jackpot prizes; that jackpot fee may or may not be considered as part of the rake by the casino (but since it is being removed from the pot, it really should be considered such by the player). Jackpot fees are often (though not always) collected separately and dropped into a separate drop box on the other side of the dealer.
The rake is not the only drain on a pot, however; players will customarily tip a small amount called a toke to the dealer after they win a pot, thus shrinking their winnings even further. A typical toke is $1 for pots between $6-80, $2 for pots above that or for special service. Toking is not required, but it is expected, in much the same way that tipping of restaurant waitresses is expected but not required.
Standard rakes are usually a small percentage of the amount in the pot, capped at a certain fixed dollar limit. A typical rake structure found at most small limit games is 5% of the pot, capped at $3. There is typically no rake taken at all for pots below a very small amount.
Since rakes in physical casinos are typically done with physical coins or chips, they are also discrete. That is, a rake is rounded up or down to the nearest coin or chip of appropriate denomination. For instance, in a 5% rake game, with a pot of $11, the rake would typically be 50 cents, since most casinos won't bother with the extra nickel, and would only deal with quarters and dollar chips.
Online casinos typically rake using percentages rounding to the nearest penny (though they may round to a nickel instead), since it's easy for them to take the extra cent or two. This presumably results in somewhat higher rake amounts than live brick and mortar casinos. However, players who sign up for online casinos through a rakeback provider can earn a rebate worth a significant percentage of the rake collected in pots they participate in (typically between 25 and 35 percent).
Because of the gambling law in California, card rooms and casinos there (except for Indian casinos) cannot rake a percentage of the pot - they must instead rake a fixed fee out of every pot regardless of its size. Because this tends to increase the rake for small limits, some Indian casinos in California have begun adopting this practice as well.
The raking structure in California has changed over the years, but the standard structure has now gravitated towards a rake of about $3-$4 for a typical hand, $1-$2 for shorthanded games, and only $1 if the hand ends before the flop is dealt. Rakes are generally $1 higher for hi-lo split games. Jackpot fees (usually $1) are usually added on top of the rake.
In many California card rooms up until about 2004, the rake was paid by the player who had the button. The player on the button placed an amount equal to the rake on the button, which was then taken by the dealer and placed on the drop box. The amount the player had placed on the button counted as a "live blind", up to a total of one small bet (any amount that the rake was over a small bet was considered forfeit to the casino). This affected play, since it meant the button was almost required to call all hands (indeed, they were usually "already in", just like the big blind was), but it did result in bigger pots for the players.
However, sometime in 2004, most card rooms in the state began switching to a more standard practice of simply taking the rake from the pot once the flop was dealt (and there was a pot to rake). There are still some holdouts (and some with even weirder rake/blind structures, like the Comstock Card Club), but most have now standardized on raking the pot for their fixed fee.
Because the rake is usually only $1 if there is no flop, it has led to a common practice in California card rooms of the small blind sacrificing the dollar from their blind if all other players have folded, but being allowed to withdraw the remainder of their blind. This is called a "chop" in common parlance (adding yet another meaning to that Poker term) and is not only considered courteous, it can sometimes save both of the blinds some money. Note that this is somewhat different than the small blind merely folding: instead of the big blind picking up the remainder of the small blind, the small blind gets to withdraw it. That's why chopping requires the approval of both blinds.
Consider the case of a 3/6 game with a $4 rake (as is typical in San Jose). If all players have folded, there is currently only $4 in the pot (the blinds). If the small blind sacrifices their blind,t he house takes $1 and the big blind gets their money back. If the small blind does not sacrifice their blind but instead merely calls, there is now $6 in the pot, and the house will take $4 of it. If the big blind folds immediately after the flop, the small blind has not made anything (they put in $2 extra and won $2 back), but the big blind has lost their whole blind. In short, no one wins except the house. This means, if the small blind doesn't feel confident in raising (in which case they can possibly win $2 of the big blind's $3), there is really no point in "just calling". Folding saves the big blind money, saves everyone's time, and gives good karma points.
In a 2/4 game with a $4 rake (as is found at Bay 101), sacrificing the small blind saves the small blind money, since if they just call, the pot will be raked down to $0 (I actually saw a hand played to the river once with $0 in the pot, and the two players began discussing who had "won") and the small blind has lost not only their blind but the additional $1.
Online Poker Rake Methods
Dealt Rake is one method of calculating rake in online poker rooms. Every player dealt into the hand will receive equal credit for the rake calculated. If there are 9 players at the table, and $3.60 is raked to the house, each player will be credited for a $0.40 rake contribution. This type of rake structure will tend to favor tighter players, as they will still receive equal rake credit for the hands they fold.
Contributed rake, also known as Shared Contributed or Average Contributed, only credits players who have put money into the pot. It doesn't matter how much money was put into the pot, the rake contribution will be divided evenly among players who put money in. This method can benefit loose players, especially those who call pre-flop often. It is also great for ante games, such as stud, since nearly every hand qualifies.
The weighted contributed rake method is an advancement of the contributed rake methodology. This method credits rake by calculating the percentage of the rake put into the pot by each player. For example, if a player folds preflop only putting in a $2 blind, and 3 other players end up contributing $6 each to the pot, then the player who folded pre-flop will only be credited for 10% of the rake collected during the hand. The other three players will be credited for their 30% contributions to the poker rake.
The weighted contributed rake methodology is considered to be of the most equitable ways of calculating rake. Rewards are given to players corresponding directly with how much money they are putting at risk. Weighted contributed rake is not ideal for winning players or tight players. This system rewards looser players for their larger rake contribution.
Winner Takes All
The winner takes all method assigns rake only to the player who wins the pot. The idea with winner takes all is that the winner of the pot would have received the entire pot, even if there were no rake taken. The winning player will be credited for all of the rake generated in a given pot with the other players receiving no credit.
This method may seem to benefit decent players at first glance, but this is not necessarily the case. Knowledgeable players tend to win larger pots and may not benefit from the WTA rake calculations. Players who call down too often or bluff aggressively will tend to be rewarded more than tighter players using this rake method.
Recently, poker rooms have been adjusting in order to better reward recreational players. Knowledgeable players win more often and end up with most of the money deposited by losing players. Some poker sites have adjusted their rake calculations in order to reward the losing players and keep them depositing. This is accomplished by utilizing standard rake assignment methods and combining this with newer, source-based rake calculations. Essentially, this means the source of money won at the table is tracked and the losing players will be rewarded.
More information about rake
Poker Rake - Wikipedia.org