Ping, or latency, refers to the time it takes for information—in this case, packets of data—to be sent from your machine to a server and its subsequent response time. Ping is measured in milliseconds, so the lower the ping number, the faster the connection.
Shorter connection routes between your device and gaming servers are preferable for lowering ping as they reduce any noticeable delays between your actions and what happens in-game. Using a VPN can help to shorten this route by connecting to a VPN server closer to the gaming server.