Table tennis singles play is as follows. Putting the ball into play requires service: the server has the ball in their open palm, tosses the ball into their air at least 6 inches, and hits it such that the ball bounces on the side of the server, then the other side. If the ball hits the net as it goes to the other side, it is still in play, unless this occurs during the serve, in which case this is called a "let." Service alternates between the different sides after every 2 points scored. In a game series, the players alternate sides of the table every game.
To score, conventionally, the ball has to either bounce twice on the opponent's side of the table or if it bounces once, the opponent does not legally put it back into play or it hits their body. One can also get a point if the opponent touches the table with their hand or hits the ball with the paddle twice.
Games are played to 11 points, unless the score gets to 10 points for both sides, where a team has to gain a 2-point advantage to win and during this time, players alternate service every point.
Doubles play is similar to singles, but has some differences. The first difference is regarding service of the ball into play. The server assumes the same serving parameters as singles, except they have to cross-serve. They have to serve the ball on one half of their side of the table and the ball has to hit the other half of the other side of the table (the image above shows cross-serve a little better).
Like singles, the serve stays on one side of the table for 2 points, one player from each team serving both points in a stretch. During play, each team's players have to alternate hitting the ball; no player on one team can return the ball two times in a row. Otherwise, singles play is identical to doubles.