It is not possible that a player is being excluded from a pot because he has not enough money. With the so called “all in” he remains with his betted amount up to now in the pot, however, he can win as much how as he has betted. If more than 2 players are involved in this pot, a Side pot is formed.
Here is one example:
Player A goes with 100 $ all-in. Player B calls his all in (100 $). Player C goes all-in with 400 $ and player B goes all-in with his remaining 100 $. In this case a side pot is created.
The Main pot contains the money which player A can win (his 100 $ and 100 $ of player B and C). The side pot is formed with the money which player A has no participation in (100 $ from player B and 300 from player C). Player C has 200 $ too much in the side pot and neither player A nor player B can win this money. If player A has the winning hand, then he will win the main pot in the amount of 300 $. The side pot (200 $) goes to either player B or C, depending on who has the better hand. 200 $ will go back to player C since that amount was too much in the side pot. If player C has the best hand of these 3 players then he wins the side pot 300 $, the main pot 200 $ and his 200 $.
It seems a little confusing at the beginning, but once you deal with this subject more often I’m sure you will get the hang of it.