The Black Mass is (arguably) the true main antagonist of the Samurai Jack series, as it is a living, non-sapient mass of pure evil that was the spawner of the demon Aku, who became Samurai Jack's nemesis. Before it could consume the universe, three deities (Odin, Ra, and Vishnu) arrived to exterminate this great evil.
The Black Mass appeared in "Episode XXXVII: The Birth of Evil, Part 1" when it attacked the universe. Odin, Ra and Vishnu arrived to pursue the mass. After a fierce battle, the three Gods finally defeated the Black Mass. Unfortunately, it was not completely destroyed: a fragment of the Black Mass drifted away from the battle unobserved and crashed into the Earth approximately 65 million years before the rise of Aku. The subsequent impact is believed to have triggered the K-T extinction period, more commonly known as the event which wiped out the dinosaurs.
As life on Earth began to evolve anew, many people and animals are destroyed by the Mass as it continually expanded. When the Black Mass approached Imperial Japan, Samurai Jack's father, who was the Emperor, attempted to destroy the Black Mass with a poisoned arrow, which only resulted in the Black Mass becoming sapient and aware. The fragment of the Black Mass then evolves into a large demon before taking on the name Aku. He then went on to raze the Emperor's palace and surrounding village, before he returned with an enchanted blade to banish Aku back into the earth. Aku would later rise again, and eventually come to conquer and dominate the Earth.
Eventually, in the series finale CI, Samurai Jack was able to travel back to the past to the moment right after Aku had sent him into the future (thanks to the help from Ashi, who was able to inherit Aku's powers as she is one of his daughters). With that in mind, Samurai Jack manages to kill Aku with his sword, destroying what's left of the Black Mass and freeing the universe from its tyrannical control for good. However, this came at a sad price as Ashi starts to fade from existence since she was created from the Black Mass, much to Jack's distraught.