The pot in poker refers to the sum of money that players wager during a single hand or game, according to the betting rules of the variant being played. It is likely that the word pot is related to or derived from the word jackpot.
Main pot 40 (A)+40 (B)+40 (C), side pot has 40 (B)+160 (C). Player B folds, forfeiting side pot of 200 to B. (A does not have an interest in this side pot.) Player A wins at showdown, and gets main pot of 120.
Side Pot Example. Player A has $1,000, Player B has $600, and Player C has $200. Player A bets $100, Player B raises to $300, Player C calls all-in for his remaining $200, and Player A calls Player B's raise of $300. Because Player C could not call the full raise, there is now a main pot and a side pot. The side pot is the money that has been. Side pots develop from the fact that players can only win a maximum of the amount that they wagered from each of the players who call them. Thus any wagers above that amount are placed in a separate pot which is competed for by everyone except for the all-in player. As to your specific questions. Side Pots are also quite common in poker tournaments. If a small stack goes all-in for a small amount of chips, two larger stacks might then build up for a side pot that might be much larger than the main pot. Even if you think the small stack will win the main pot, it may still be advantageous to attack the side pot aggressively.
At the conclusion of a hand, either by all but one player folding, or by showdown, the pot is won or shared by the player or players holding the winning cards. Sometimes a pot can be split between many players. This is particularly true in high-low games where not only the highest hand can win, but under appropriate conditions, the lowest hand will win a share of the pot.
See 'all in' for more information about side pots.