When fully implemented, sixth generation (6G) wireless systems will constitute intelligent wireless networks that enable not only ubiquitous communication but also high-accuracy localization services. They will be the driving force behind this transformation by introducing a new set of characteristics and service capabilities in which location will coexist with communication while sharing available resources. To that purpose, this survey investigates the envisioned applications and use cases of localization in future 6G wireless systems, while analyzing the impact of the major technology enablers. Afterwards, system models for millimeter wave, terahertz and visible light positioning that take into account both line-of-sight (LOS) and non-LOS channels are presented, while localization key performance indicators are revisited alongside mathematical definitions. Moreover, a detailed review of the state of the art conventional and learningbased localization techniques is conducted. Furthermore, the localization problem is formulated, the wireless system design is considered and the optimization of both is investigated. Finally, insights that arise from the presented analysis are summarized and used to highlight the most important future directions for localization in 6G wireless systems.