We investigate the effects of the CNO cycles on the formation of the blue loop for intermediate mass stars of solar-like metallicity. By use of two ways to treat the CNO cycles, we find that the models adopting the CNO bi-cycles (CNO models) develop extensive blue loops while those only considering the CN cycle (CN models) do not. We compare the properties of the CN and CNO models to explore the triggering mechanism of the blue loop. We notice that during the blue loop the increase of luminosity is determined by the nuclear energy production in the stellar core while the increase of effective temperature measures how far the stellar envelope can expand for a given luminosity at its base. We find that the stellar envelope obeys the virial theorem to a very high accuracy. Thus in a convection-dominated envelope, the extra heat from its base will lead to more developed convective motion and the decrease of temperature, and the star evolves up along the RGB. However in a radiation-dominated envelope, the increase of luminosity requires the increase of temperature to enlarge the radiation transfer efficiency, and the star develops a blue loop. We introduce an envelope convective ratio η, which is defined by the envelope convection mass divided by the total envelope mass, to measure the development of convection in the stellar envelope. It is found that the critical value, ηcrit, for a star to develop a blue loop is between 0.3 and 0.45, and ηcrit shows a weak dependence on the stellar mass. On the other hand, we find that the enhancement of the energy production rate in the H-burning shell is responsible for the increase of the stellar luminosity during the blue loop phase. The increasing central He-burning rate increases the temperature of the H-burning shell, while the movement of the H-burning shell along the chemical profile enhances its energy production efficiency. We find that higher 14N abundance in the H-burning shell plays a crucial role in the formation of the blue loop for the CNO models. It makes the H-burning shell not only move quickly toward the lower temperature region in the pre-loop phase to decrease the stellar luminosity and η, but also place the hydrogen discontinuity closer to the shell source to increase the stellar luminosity during the blue loop phase by adding higher abundant hydrogen into the H-burning shell. We find that overshooting from the convective core makes the abundance discontinuity layer displace farther from the stellar core, which makes the energy production of the H-burning shell less efficient and the blue loop more difficult to be formed. The opacity enhancement of the OPAL over the LAOL leads to stronger convective motion in the stellar envelope and thus makes the blue loop more difficult to form.