A crime against humanity is a large scale atrocity against a civilian population, such as genocide, ethnic cleansing or the massive killing of civilians during war, and is the highest level of criminal offense. It is either a government policy or a wide practice of atrocities tolerated, condoned or facilitated by a government. Atrocities such as murder, torture and rape are crimes against humanity only if they are large scale and part of a widespread or systematic practice organized or condoned by a government. Isolated atrocities are certainly human rights violations, and can perhaps even be war crimes, but they don’t fall into the category of crimes against humanity. (And acts which do not violate human rights can never be crimes against humanity, even if they are widespread and systematic and even if they cause suffering).
Crimes against humanity can take place during a war or in peace time, and can be committed by a state against its own citizens or against the citizens of another state.