Complex sentence: Each batsman continues batting until he is out and the batting team until ten batsmen are out when the fielding team comes in to bat.
Split into simpler sentences: Each batsman continues batting until he is out. The batting team continues batting until ten batsmen are out, at which point the teams switch roles and the fielding team comes in to bat.