Besides the increase in global energy demand, access to clean energy, reduction in greenhouse gas emissions caused by conventional power generation sources, energy security, and availability of electricity in remote villages in emerging nations are some of the factors that foster the use of renewable energy sources (RESs) in generating electricity. One of the aims of initiating microgrids (MGs) is to maximize the benefits of RES and alleviate the associated grid integration issues. Microgrids are made up of RES connected to electrical loads within clearly delineated electrical limits that operate as individual controllable units on the electrical network. It can operate in-dependently as well as in connection with the grid. The paper presents an overview of microgrids and investigates the system's performance when connected to and disconnected from the grid. Furthermore, in both modes of operation, the functioning and behavior of system components such as the bidirectional DC-DC converter and energy storage system (ESS) were evaluated. The architecture of the proposed microgrid consists of a small hydropower plant, a wind farm, and a battery energy storage system (BESS). The microgrid under investigation is modeled and simu-lated using MATLAB and Simulink.