A microgrid (MG) is a cyber-physical system that facilitates integration of several distributed renewable energy resources. In the last decade, several efforts were made to standardise the framework of a cyber-physical MG network and its control structure. In this perspective, various studies discussing the different control techniques are reported in the literature. However, a comprehensive and systematic review of a cyber-physical MG is discussed rarely. In this study, a comprehensive review of a MG architecture and hierarchical control structure in both islanded and grid-connected modes are presented. The hierarchical control of the MG includes primary, secondary, and tertiary control. Recent studies provide significant opportunities in dividing the control task among various layers resulting in a distributed framework. This study analyses the cyber and physical networks separately while discussing the primary, centralised, and distributed secondary control levels with their merits, demerits, and typical applications. A Venn diagram analysis is also presented that clearly distinguishes the primary control scheme in different research sub-areas. Furthermore, the MG communication structure, protocols, design, constraints, and cyber security are also reviewed systematically. Finally, future trends are summarised based on the state-of-the-art MG research. © The Institution of Engineering and Technology 2020.