One team bats, one team bowls, then they swap
The batting side tries to score; the bowling side tries to dismiss them. Once enough batters are out, the innings ends and the roles reverse. That is the whole structure, and everything else is detail layered on top.
A side fields eleven players, and since a batter needs a partner at the other end, the number of dismissals that ends an innings is one fewer than the number of players. That relationship is worth understanding rather than memorising.