How does GPS measure any plane's ground speed?
GPS is primarily made to determine the position of the receiver.
Therefore, GPS uses several satellites with exactly known positions which send very precisely timed signals. From the time difference between the signals when arriving at the receiver, the own position in space can be calculate, typically given in earths coordinate system.

Get the position two times, calculate distance, divide by time difference, and you have speed.

Another way is to measure the frequency of the signals from the satellites, since it slightly varies with speed due to the Doppler effect. This is similar to the shift in pitch of the horn of a police car passing you.
This method gives you a speed value directly with your position.

As side note: 
GPS often is not that precise and gives your position with some offset. BUT the offset is mostly constant, so while the position is not correct, the distance traveled and so the speed is.