Explanation:
A radar gun (also known as a Doppler radar) uses the Doppler effect when measuring "return echoes" after having sent a microwave signal (a type of electromagnetic radiation).
In this context the Doppler effect consists of the change in a wave perceived frequency when the emitter of the waves, and the observer move relative to each other.
In the case of radars, a microwave signal is sent to a target (the tennis or baseball in this case) and then is reflected after "hitting" the target, so that the radar system measures this difference between the sent signal and the reflected signal.