As a promising paradigm to provide high spectral efficiency and energy efficiency, heterogenous radio access networks (HetNets) have attracted a lot of attention from both academia and industry. This paper presents a comprehensive survey of the recent advances in HetNets, including system architecture evolutions, key techniques, and open issues. The system architectures introduced include conventional HetNets, HetNets with cloud computing, and HetNets with fog computing. In addition, a novel performance metric, together with network self-organization and access slicing, is elaborated, which can help realize a cost-efficient HetNet. Moreover, the other state-of-the-art key techniques in HetNets are surveyed, including nonorthogonal multiple access, interference suppression, and channel estimation in the physical layer, the radio resource allocation in the medium access control layer, and clustering in the network layer. Given the extensiveness of the research area, future research opportunities are identified, which are related to access slicing, HetNets driven by deep learning, and so on.