Due to the open nature of wireless communication systems, the data transmission over these networks are vulnerable to malicious attack. To safeguard the transmitted data, physical layer security (PLS) has been emerged as a promising technique because of its unique feature of utilizing randomness of the wireless channel to secure the information. The preeminent idea of utilizing the channel imperfections such as fading and noise into the security providing resource is the basic approach behind PLS. For exploiting the randomness of the propagation medium, the analysis of the secrecy performance over the fading channel is of utmost importance. With the explanation of basic theory and technology, this paper presents an elaborated survey on the PLS research over the fading channels. To exploit the performance gains, we discuss the optimization approaches in different network design problems, for example, secrecy rate maximization, power minimization, and secure energy efficiency problems. We present a comparative study of the expressions of various performance metrics of the PLS along with classification depending upon the channel state information of the eavesdropper. The application and challenges of the PLS in the emerging wireless technologies are also reviewed and discussed. This paper incorporates almost all the aspects of PLS implemented over the fading channels. Furthermore, the paper is concluded with open research directions for the PLS system in various fields that can be explored to design a flexible and robust security system to satisfy the security requirements of the next‐generation networks.