A side pot is made when one or more players go all-in but don't have enough chips to cover the other players' bets still in the hand.
For example, let’s assume we are playing ina three-handed $5/$10 cash game where one of the players has $500, and the other two players are sitting with $1,000 each. If the player with a shorter stack goes all in and both players call, then $1,500 goes into the main pot, and all three players are eligible to win that.
That being said, if the two players left with some chips decide to bet further, that creates a side pot that only these two players can win. Since the first player who initially started with $500does not have any more chips and does not participate in the hand, he is only competing for the main pot in this situation.
In theory, there can be situations with multiple side pots created, but that is quite rare. Even if that happens, the whole principle is the same as we covered in the previous example. You just need to keep dividing it into separate pots if more and more players move all in during the hand and have different stacks behind them.
The good news is that all this is done automatically if you play online, and the dealer will take care of everything in live games. Therefore, you do not need to count yourself but must understand how it works.