This paper presents a review of advanced control techniques for microgrids. The paper covers decentralized, distributed, and hierarchical control of grid connected and islanded microgrids. At first, decentralized control techniques for microgrids are reviewed. Then, the recent developments in the stability analysis of decentralized controlled microgrids are discussed. Finally, hierarchical control for microgrids that mimic the behavior of the mains grid is reviewed.