Legal definition of genocide can be found in 1948 United Nations Convention on the Prevention and Punishment of the Crime of Genocide (or CPPCG). It was, indeed, the reaction of United Nations to holocaust committed during the World War II by German Nazis. However, before we continue, it is appropriate to define genocide.
Genocide can be, and usually is, defined as deliberate and systematic destruction of ethnic, racial, religious or national group. It does not really matter whether those, who commit genocide, target the whole group or just part of this group. Both ways, genocide remains the crime against humanity and it is persecuted under international law. Since the CPPCG came into effect, it has been signed by over 80 member states of United Nations.
The international persecution itself began at the Nuremberg trials. Judging those responsible for holocaust and of committing war crimes was the purpose of these trials. However, these trials are often criticized. The reason is simple. Victors judged their enemy. I think that no sane person can say that leading Nazis did not deserve to be trialed. They indeed deserved to be punished for their crimes. Anyway, Nuremberg trials are often criticized because of that only losing side was judged. These trials did not focus on any of the war crimes committed by Allied forces, and these were numerous too.
After Nuremberg trials, there was no international prosecution of genocide in about forty years until the Rwandan and Bosnian genocides. Apparently, this was mainly caused by the late joining of CPPCG by the most powerful countries (for example United States only joined in 1988). With some of the most powerful countries not being the signatories of CPPCG, the effective enforcing of these laws world-wide was not possible. Anyway, both, in case of Rwandan and Bosnian genocides, people held responsible for these crimes were judged and found guilty. However, not all people held responsible for Bosnian genocide were caught.
Also, people responsible for genocide committed during war in Darfur (in Sudan) have been internationally persecuted.
Although, it might seem that a lot has been done in order to prevent and internationally persecute genocide, the truth is that it is not enough. In fact, enforcing the practice of international laws against genocide can be difficult in some cases. There are signatory countries of CPPCG that have joined only under condition that no claim of genocide can be brought against them at the International Court of Justice, unless they agree to it. This is the case of United States, Vietnam, India and several other countries. This immunity has even been used from time to time. For example by United States after the Kosovo war. Unless all countries are equal before international law, the prosecution of genocide will never be as effective as it should be.