The United Nations has not succeeded in preventing all wars from occurring. In fact, the United Nations has been unable to stop such wars as the Vietnam War or the Iran-Iraq War. Clearly, the UN has not been able to completely suppress war and bring about true global peace.
However, this is surely too much to ask of any organization. What many scholars of international relations say is that the UN has contributed to creating a world in which there is less war. It has done this by allowing nations to have many ways of interacting with one another. It has created all sorts of organizations in which various countries that might become enemies have all been represented. This builds up the contacts and ties between the countries and, the theory goes, helps to prevent conflict in this way.
The UN, then, has clearly not ended war in this world. However, it is possible to argue that it has helped to create a world in which war is less common.