In this paper, a theory of the geological magnetic filter for the improvements of the signal to noise ratio of the magnetic detection system has been developed. The geological magnetic filter takes two sequences of magnetic fields measured from the reference sensor and the detector sensor and calculates the correlations between them in the frequency domain. Using the filter, we can remove the coherent noises in the time domain and improve the signal to noise ratio of the magnetic detection system. With the recent developments of the DSP hardware technology the geological magnetic filter can be easily implemented using the digital signal processor. We show the ability of the geological magnetic filter under various circumstances through computer simulations. Numerical simulation results show that geological magnetic filter can excellently remove the sensor misalignment effects and the regular short range local noise as well as it delete the coherent noises.