To add to this, the teams switch offense and defense sides after the defense gets three players on offense "out" or eliminated. Outs are achieved in one of three ways.
1) "Striking out" a batter. It is a "strike" against the hitter when: a) they hit a ball out of bounds, b) when they swing at a pitch and miss, and c) when they fail to make an in-bounds hit on a pitch that passes through a designated "strike zone" above the base. Three strikes and the batter is out.
2) Catching balls before they touch the ground after a successful hit. This makes balls that fly high after a hit particularly dangerous, since they are easier to catch.
3) As a correction to the bolded above, the third method to getting a player out is if a player on defense, while carrying the ball: a) touches an offensive player that isn't on a base, or b) touches the base that the offensive player is trying to reach before they get to it.
3b only takes effect when the offense player HAS to go to that particular base. For example, a batter must get to at least the first base after a successful hit - if a defender gets a ball to first base before the batter gets there, he is out. Similarly, a player at first base must go to at least the second base if his teammate makes a successful hit, since no more than one player can be on a base at a time.
Getting the ball to the pitcher doesn't cause any sort of elimination, but it does move the game forward to the next batter. If a player on base is gutsy enough, he can try to "steal" a base - advancing to the next base(s) without a batter hit to make his advance easier.