Anubis, as the god of death and the afterlife, was closely associated with mummification and burial rites. Egyptian jackals had an association with the dead, as well. They were often found digging up buried bodies and eating them, which may be why Anubis was depicted as part jackal. The priests who mummified the dead kings (called pharaohs) wore costumes to make them appear like jackals.
The Egyptian people believed that Anubis helped decide the fate of the dead in the afterlife. The heart of the dead was weighed against the feather of truth (representing the goddess Ma'at), to see if the deceased was worthy of entering the afterlife. If the person had lived an evil life, his or her heart would be heavy with evil, and he or she would be eaten by Ammit (the Devourer). If a person was kind and good, the heart would be light, he or she could continue on to the afterlife safe and sound to meet Osiris. 
In Greece and RomeEdit
In later times, during the Ptolemaic period, as their functions were similar, Anubis came to be identified as the Greek god Hermes, becoming Hermanubis. The centre of this cult was in uten-ha/Sa-ka/ Cynopolis, a place whose Greek name simply means "city of dogs". In Book XI of "The Golden Ass" by Apuleius, we find evidence that the worship of this god was maintained in Rome at least up to the 2nd century. Indeed, it was revealed that Hermanubis also appeared in the alchemical and hermetical literature of the Middle Ages and the Renaissance.
Although the Greeks and Romans typically scorned Egypt's animal-headed gods as bizarre and primitive (they mockingly called Anubis the "Barker"), Anubis was sometimes associated with Sirius in heaven, and Cerberus in the underworld.