Localization techniques are becoming key to add location context to Internet of Things (IoT) data without human perception and intervention. Meanwhile, the newly-emerged Low-Power Wide-Area Network (LPWAN) and 5G technologies have become strong candidates for mass-market localization applications. However, various error sources have limited localization performance by using such IoT signals. This paper reviews the IoT localization system through the following sequence: IoT localization system review -localization data sourceslocalization algorithms -localization error sources and mitigation -localization performance evaluation. Compared to the related surveys, this paper has a more comprehensive and state-of-theart review on IoT localization methods, an original review on IoT localization error sources and mitigation, an original review on IoT localization performance evaluation, and a more comprehensive review of IoT localization applications, opportunities, and challenges. Thus, this survey provides comprehensive guidance for peers who are interested in enabling localization ability in the existing IoT systems, using IoT systems for localization, or integrating IoT signals with the existing localization sensors.