The development of the Internet of Things (IoT) has triggered a virtual wave of interconnection and intercommunication among an enormous number of universal things. This has caused an exceptional surge of colossal heterogeneous information, known as an information explosion. Until now, cloud computing has filled in as a proficient method to process and store these data. Still, it came to light that by utilizing just cloud computing, pesky issues like, the expanding requests of actual-time or speed-sensitive applications and the restrictions on system transfer speed could not be solved. Consequently, another computing platform, called fog computing has been advanced as a supplement to the cloud arrangement. Fog computing spreads the cloud administrations and services to the edge of the system, and brings processing, communications and reserving and storage capacity closer to edge gadgets and end-clients and, in the process, aims at enhancing versatility, low latency, transfer speed and safety and protection. This paper takes an extensive and wide-ranging view of fog computing, covering several aspects. At the outset is outlined the many-layered structural design of fog computing and its attributes. After that, chief advances like communication and inter-exchange, computing, reserving and storage, asset administration, naming, safety and safeguarding of privacy are delineated while showing how this backup and facilitate the installations and various applications. Then, numerous applications like augmented reality (AR), healthcare, gaming and brain-machine interface, vehicular computing, smart scenarios etc. are highlighted to explain the fog computing application milieu. Following that, it is shown that how, despite fog computing being a features-rich platform, it is dogged by its susceptibility to several security, privacy and safety concerns, which stem from the nature of its widely distributed and open architecture. Finally, some suggestions are advanced to address some of the safety challenges discussed so as to propel the further growth of fog computing.