You have two sides, one out in the field and one in. Each player that is in the side goes out when they are out they come in
then the next player goes in until they are out.
When they are all out the side that is out all come in and the side that has been in goes out and tries to get those coming in out.
Sometimes you get players still in and not out.
When both sides have been in and out including the not outs the game will end