The microgrid (MG) can be considered as a small-scale power grid that consists of distributed energy resources (DERs), loads, and controllers. One of the major advantages of the MG is that it can operate in grid-connected or islanded modes that can generate, distribute, and regulate the power flow to local consumers. The increasing interest in smoothly integrating renewable energy into the power grid is one of the main reasons for the development of the MG concept. In addition, most renewable energy systems provide the network with the needed power, which can be directly used or stored through energy storage systems, which enhances the overall performance of the MG. Developing a proper control and management system for MGs is not an easy task. There are many challenges to ensuring a reliable system and efficient operation. Recently, industry authorities have begun many efforts in the field of MG implementation and controls. This article provides a complete description of the main features and challenges of ac MGs and describes the hierarchical control architecture as an effective solution. A detailed discussion of the control levels is presented as well.