This survey article focuses on the physical layer for cognitive radio (CR) networks, namely the techniques to detect the presence/absence of licensed users in the different spectrum bands. The techniques presented in this article, including their advantages and disadvantages, are organized in a hierarchical fashion as follows: fundamental detection techniques (energy-based detection, matched filter, and cyclostationarity features), fundamental-detection-based techniques (waveform detection, radio identification, localoscillator leakage power), and alternative techniques that are typical of the image analysis domain (Hough and Wavelet transforms). Additionally, the main challenges associated to licensed user detection are described together with the various spectral dimensions where cognitive radio devices can find new spectrum opportunities.