This depiction of Kali and Shiva references the human experience of death. Kali, who represents dissolution mates with Shiva, who represents creation. She drives him mad and he forgets who he is. For a time, Shiva is lost. Such is death.
Lilith is a Hebrew name for a figure in Jewish mythology, developed earliest in the Babylonian Talmud, who is generally thought to be in part derived from a historically far earlier class of female demons.