Cloud computing is one of the most spectacular technological achievements of the 21st century, allowing users to access various on-demand services (e.g., storage, servers, networks, apps, and services) from anywhere. All advanced technologies such as internet of things (IoT), smart cities, smart grid, system automation, 5G, and logistics systems require services offered by cloud computing. This paper provides a complete architectural tutorial on cloud computing, focusing on various service and deployment models, architectures, inter-clouds concepts, and multiple merits of cloud computing in artificial intelligence, fog computing, edge computing, and IoT. It also discusses different quality-of-service (QoS) parameters that are helpful for the consumers to decide upon the service quality offered by any cloud provider. A comparative study of the hypervisor and container-based virtualization technologies has been discussed. Finally, simulation tools and various open research issues of cloud computing are presented, appealing for the researchers to decide on future research directions.