Reconfigurable intelligent surfaces (RISs) are envisioned to transform the propagation space into a smart radio environment (SRE) to realize the diverse applications of sixth-generation (6G) wireless communication. By smartly tuning the massive number of elements via controller, an RIS can passively phase-shift the electromagnetic (EM) waves to enhance the system performance. The absence of radio-frequency (RF) chains makes RIS an energy-efficient and cost-effective solution for future wireless networks. In this paper, we explore the state-of-the-art research on different aspects of RIS-assisted communication. Specifically, we first introduce the fundamentals of RIS, including the RIS's structure, operating principle, and deployment strategies. We then comprehensively discuss the emerging applications of RISs for 6G wireless networks. In addition, we elaborate on the crucial challenges for RIS-assisted networks, namely, RIS channel state information (CSI) acquisition and passive beamforming optimization. Furthermore, we present the recent research contributions leveraging the artificial intelligence (AI) based techniques for channel estimation, phase-shift optimization, and resource allocation in RIS-assisted networks. Finally, to provide effective guidance for future research, we highlight important research directions for realizing RIS-assisted network.