Alice has 50 chips
Bob has 75 chips
Craig has 100 chips
Alice goes all in, and Bob goes all in too, and Craig calls.
Main pot is Alice's 50 + Bob's 50 + Craig's 50, or 150 total. If Alice has the best hand, she takes all 150 but can't win more than that.
Bob's remaining 25 chips + Craig's 25 chip call goes into a side pot worth 50 chips. If Bob has the best hand out of all three players, he wins this 50 and the 150 in the main pot, but if Bob's hand isn't as good as Alice's but does beat Craig's, then Bob would win this 50 chip side pot only.
Craig's remaining 25 chips (after calling the all-ins) is safe and cannot be won by either Alice or Bob. If Craig has the best hand, he scoops the 150 main pot and 50 side pot. If Craig beats Bob but not Alice, then he gets only the 50 side pot chips.
(The example has the players in increasing chip stack, but it doesn't really matter the order. If Craig goes all-in for 100, even though neither Alice nor Bob can make a full call, if they call they are all in. 50 from each player makes the main pot, 25 each from Bob and Craig make the side pot, and Craig pulls back the excess 25.)