The Internet of Things needs for computing power and storage are expected to remain on the rise in the next decade. Consequently, the amount of data generated by devices at the edge of the network will also grow. While cloud computing has been an established and effective way of acquiring computation and storage as a service to many applications, it may not be suitable to handle the myriad of data from IoT devices and fulfill largely heterogeneous application requirements. Fog computing has been developed to lie between IoT and the cloud, providing a hierarchy of computing power that can collect, aggregate, and process data from/to IoT devices. Combining fog and cloud may reduce data transfers and communication bottlenecks to the cloud and also contribute to reduced latencies, as fog computing resources exist closer to the edge. This paper examines this IoT-Fog-Cloud ecosystem and provides a literature review from different facets of it: how it can be organized, how management is being addressed, and how applications can benefit from it. Lastly, we present challenging issues yet to be addressed in IoT-Fog-Cloud infrastructures. low latency, and mobile applications. The centralized cloud data centers are often physically and/or logically distant from the cloud client, implying communication and data transfers to traverse multiple hops, which introduces delays and consumes network bandwidth of edge and core networks [2].The widespread adoption of cloud computing, combined with the ever increasing ability of edge devices to run heterogeneous applications that generate and consume all kinds of data from a variety of sources, requires novel distributed computing infrastructures that can cope with such heterogeneous application requirements. Computing infrastructures that enact applications at edge devices have started to appear in recent years [3,4], improving aspects such as response time and reducing bandwidth use. Combining the ability of running smaller, localized applications at the edge with the high-capacity from the cloud, fog computing has emerged as an paradigm that can support heterogeneous requirements of small and large applications through multiple layers of a computational infrastructure that combines resources from the edge of the network as well as from the cloud [5].In this paper, we aim at identifying and reviewing the main aspects and challenges that make the combination of fog computing and cloud computing suitable for all kinds of applications leveraged by the Internet of Things. We discuss aspects from the infrastructure (processing, networking, protocols, and infrastructure for 5G support) to applications (smart cities, urban computing, and industry 4.0), passing through the management complexity of the distributed IoT-fog-cloud system (services, resource allocation and optimization, energy consumption, data management and locality, devices federation and trust, and business and service models).In the next section we introduce concepts and definitions for Internet of Things (IoT), cloud computi...