Decide who serves first. According to the official International Table Tennis Federation (ITTF) rules, the right to choose whether to serve first is determined "by lot" (i.e. flipping a coin or drawing straws, etc.), with the winner choosing either whether to serve first or which side he or she wants. If the winner chooses whether to serve or to receive, the opposing player or team gets to choose which side of the table they will play on, and vice versa.
In most recreational ping-pong games, however, the serve is determined by a quick rally, typically with each player spelling out one letter of the word P-I-N-G for each hit they make. After the word P-I-N-G is spelled out, the person to win the rally serves first or chooses which side of the table they wish to play on.