Side pots are formed when several players having an unequal amount of chips stack call on an all-in. In Poker, each player matches each opponents’ bet with as many chips as they have left. Players also must match what the smallest stack has contributed.

Player A with 25 chips, Player B with 75 chips, and Player C with 100 chips went all-in. 
A main pot of 75 chips is formed out of the 25 chips each from Players A, B, and C. Player B has 50 chips left (75 - 25 = 50), and this will have to be matched by Player C, forming the side pot of 100 chips. Player C's remaining 25 chips (100 - 25 - 50 = 25) will not be wagered.
If Player A has the best hand, he will only get the main pot. The side pot will be won by whoever has the better hand between Players B and C. 
If Player B has the best hand, he will get both the main pot and the side pot.