Nowadays there is very big interest in cooperative phenomena in ensembles of globally coupled limit cycle oscillators because of many possible applications in physics, chemistry, biology and medicine. Many works are dedicated to model of globally coupled oscillators proposed by Y.Kuramoto in 1984. One of the most important and interesting thing in studying such a model is to understand mechanisms that cause synchronization of oscillators. We consider finite dimensional Kuramoto model with coupling function g(x) = - sin(x - a) + r sin (2x), where a and r are parameters (Kuramoto-Hansel-Mato-Meunier model). We discuss mechanisms of appearance of different types of heteroclinic cycles when parameters change and influence of such bifurcations on phase synchronization of the system in 3 and 4 dimensional cases. We obtained some new types of heteroclinic bifurcation.