Different control strategies for microgrid applications have been developed in the last decade. In order to enhance flexibility, scalability and reliability, special attention has been given to control organisations based on distributed communication infrastructures. Among these strategies, the implementation of consensus protocol stands out to cooperatively steer multi-agent systems (i.e., distributed generators), which is justified by its benefits, such as plug and play capability and enhanced resilience against communication failures. However, as the consensus protocol has a long trajectory of development in different areas of knowledge including multidisciplinary subjects, it may be a challenge to collect all the relevant information for its application in an emerging field. Therefore, the main goal of this paper is to provide the fundamentals of multi-agent systems and consensus protocol to the electrical engineering community, and an overview of its application to control systems for microgrids. The fundamentals of consensus protocol herein cover the concepts, formulations, steady-state and stability analysis for leaderless and leader-following consensus problems, in both continuous- and discrete-time. The overview of the applications summarises the main contributions achieved with this technique in the literature concerning microgrids, as well as the associated challenges and trends.