In this paper, the optimal operation of microgrids (MGs) with thermal blocks, distributed generations (DGs), storage systems, and responsive loads is presented to achieve optimal scheduling of active, reactive, and thermal power of the mentioned elements in the day-ahead (DA) reactive power and energy market environment. The thermal block has a combined heat and power (CHP) system, a boiler, and thermally responsive loads. This scheme minimizes the difference between the total operating costs of the MG and power sources and the total revenue gained from the sale of energy and reactive power of the mentioned elements in the markets located in the MG. It is constrained by the AC power flow equations, network operation constraints, and the operating model of these elements. Furthermore, this scheme is subject to the uncertainties of energy price, load, and renewable power. In this paper, to access the optimal resistant solution against the maximum prediction error associated with the mentioned uncertainties, a robust model based on information gap decision theory (IGDT) is used. Finally, by implementing the proposed scheme on a 119-bus radial MG, the obtained numerical results confirm the ability of the scheme to simultaneously improve the economic and operational situation of the MG. The proposed scheme succeeded in improving energy cost, energy loss, voltage drop, and power factor of the distribution substation by roughly 101%, 44%, 41%, and 16% compared to power flow studies, even in the worst-case scenario caused by uncertainties.