According to Wiki
Ping is a computer network administration utility used to test whether a particular host is reachable across an Internet Protocol (IP) network and to measure the round-trip time for packets sent from the local host to a destination computer, including the local host's own interfaces.
Ping operates by sending Internet Control Message Protocol (ICMP) echo request packets to the target host and waits for an ICMP response, sometimes casually called a pong. In the process it measures the round-trip time[1] and records any packet loss. The results of the test are printed in form of a statistical summary of the response packets received, including the minimum, maximum, and the mean round-trip times, and sometimes the standard deviation of the mean.
The use of the ping utility is usually described as pinging a host computer. Ping has various command line options depending on the host operating system that enable special operational modes, such as to specify the packet size used as the probe, automatic repeated operation for sending a specified count of probes, time stamping options, or to perform a ping flood. Flood pinging may be abused as a simple form of denial-of-service attack, in which the attacker overwhelms the victim with ICMP echo request packets.
Frankly I am none the wiser
As I said, it sends 32 bytes (generally) to the required destination (virtual pub for instance) and times how long it takes to get there and back...
Given that electrons travel at the speed of light (3 x 10
8 meters per second) you can work out the theoretical best time...
Any additional time indicates a problem somewhere along the way - it could be a congested hub for instance...