Cloud computing has altered the method we hoard, process, and access data, permitting ascendable and on-demand computing resources. However, with the rise of Internet of Things (IoT) devices and the cumulative prerequisite for real-time data dispensation, the margins of cloud computing in terms of latency, bandwidth, and network mobbing have developed superficial. To address these tasks, fog computing has occurred as a delay of cloud computing, fetching computation closer to the network superiority. In this article, we delve into a comprehensive comparison of cloud, fog, and edge computing. Moreover, the article highlights the systematic shift towards edge computing, where intelligence is distributed across edge devices, gateways, and fog nodes. To facilitate accurate evaluations and analyses, we introduce two simulation tools: CloudSiM for cloud computing and iFogSim for fog computing. These tools provide researchers with realistic environments to simulate cloud and fog computing scenarios, enabling performance evaluation and optimization. Through these simulations, researchers can study critical system of measurement such as response time, energy consumption, and resource utilization.