At major tournaments, such as Wimbledon and the US Open, new balls are introduced after the first seven games and then after every ninth game. With tiny margins in placement and speed often making the difference between winning and losing, this ensures that the balls are kept in near-perfect condition throughout the matches.
As amateur tennis players don't usually have the big budget of a tennis grand slam tournament, they will replace their balls less regularly. Players will often test tennis balls by evaluating their bounce, how easy they are to squeeze, and the sound of the balls to determine if they need to be replaced. Some players will also visually inspect the exterior of the balls to check for fraying.
Pressureless tennis balls will tend to last much longer than pressurized balls, as they rely on a rubber shell rather than internal air pressure to produce their bounce. When pressureless tennis balls need to be replaced is often down to personal preference, or when there is an obvious change in the properties of the balls, such as significant fraying of the felt exterior or a reduced bounce.