Physical layer security is a promising approach that can benefit traditional encryption methods.The idea of physical layer security is to take advantage of the features of the propagation medium and its impairments to ensure secure communication in the physical layer. This work introduces a comprehensive review of the main information-theoretic metrics used to measure the secrecy performance in physical layer security. Furthermore, a theoretical framework related to the most commonly used physical layer security techniques to improve the secrecy performance is provided. Finally, our work surveys physical layer security research over several enabling 5G technologies, such as massive multiple-input multiple-output, millimeter wave communications, heterogeneous networks, non-orthogonal multiple access, and full-duplex. Also, we include the key concepts of each of the aforementioned technologies. Future fields of research and technical challenges of physical layer security are also identified.