The Doppler effect describes the change in frequency of a wave in relation to an observer who is moving relative to the wave source. In radar guns, radio waves are emitted towards a moving vehicle. The waves bounce off the vehicle and return to the radar. The frequency of the returned waves is shifted due to the vehicle's motion, allowing the radar to calculate its speed.