When a batsman is out, another comes onto the field to take his place. The innings is over when ten wickets are taken (i.e. ten of the eleven batsmen are out). After this, the team which was the 'fielding' team becomes the 'batting' team. They now have to score more runs than the other team managed to score. If they score more runs before ten wickets are taken, they win. If they do not, the other team wins.