Cognitive radio has a critical application which it is Spectrum access, and knowing that the key to this application is detected in the spectrum to find free bands. Nowadays the studies confirmed that the energy detector methods are the most convenient method. In this work, we present the energy detector and explain how it is a convenient method in a sense because it doesn't need any prior information about the primary user. The simulation of energy detection methods has been done in MATLAB program, for both, AWGN and Rayleigh channels. The simulation confirmed the theoretical results, which gives that the performance of AWGN channel is greater than a Rayleigh channel, it is also verified that the performance of the detector is independent of the type of modulation.