Lord Brahma had 4 sons born from his mind. Brahma wanted his sons to populate the world. But his sons were only interested in the glories of the Lord and were not interested in other tasks. So Brahma created further sons, all emanating from his body. Daksha was one of the sons of Brahma. He was born of Brahma's thumbs. Thus he was a Prajapati, son of Brahma, and entrusted with procreation of the world and its protection. One of Prajapati's daughter was Sati. Sati was in love with Lord Shiva. Daksha on the other hand detested Maheshwara as he considered Shiva to be a wandering ascetic, who was not clean (his body was dirty with ashes all over and had tangled locks) and who kept bad company (bhootaganas.) Sati goes ahead and marries Shiva in spite of this.
Daksha conducts a great yagna (sacrifice, offering to the Gods) and invites all beings to attend. When the Prajapati enters the yagna, everyone stands up in respect, except Lord Shiva who continues to sit down. (Lord Shiva is one among the trinity of God's forms: Bhrama the creator, Vishnu the protector and Maheshwara the destroyer, and is thus the patron of all beings of the world.) But Daksha, in his ignorance and misguided by his ego considers, Lord Shiva as only his son in law. He takes offence that Lord Shiva does not show respect by not standing up and insults lord Shiva in front of all the guests. Neither does he offer the oblations of the yagna to Lord Shiva. Followers of Lord Shiva and the Brahmins present at the yagna become at loggerheads with each other. Lord Shiva leaves the yagna saddened by the turn of events.
Later, king Daksha, conducts another great yagna for which invitations are sent to all beings created except Lord Shiva and Sati. Sati gets to know about the great gathering and asks Lord Shiva to take her to her fathers palace on the hills. Lord Shiva tells her that going for a yagna uninvited, is not a right thing nor good etiquette even if it was her father who was conducting the yagna. But Sati decides to go for the yagna, stating that she did not require an invitation as she was Daksha's daughter. Lord Shiva, however does not accompany Sati. At the yagna, Sati is received only by her mother and not by king Daksha. And there, she finds that sacrificial offerings, the oblations of the yagna were offered to all Gods except Lord Shiva. When Sati questions this, Daksha mocks her and her husband in front of everyone. Enraged by the insults about her and Lord Shiva and distraught at not listening to her Husband, she immolates herself in the sacrificial pyre.
When Lord Shiva gets to know about this, in terrible wrath, he pulls out a strand of hair from His head, and throws it on the floor. From the hair emerges a divine, terrifying being of immense size and strength, with thousand heads, eyes, arms and tusks, holding clubs, discuses, maces and other weapons. The being was Virabhadra. Virabhadra knelt before the Lord in respect. Lord Shiva says, "Spoil the yagna." Virabhadra accompanied by Godess Rudrakali, and bhootaganas immediately raced to the yagna and laid waste to the venue, the offerings, the mountains of food, and the attendees of the yagna. Virabhadra and other bhootaganas trampled upon the guests, brahmins and other demigods at the venue. Many God's were gravely injured. Daksha was beheaded and his head was put into the pyre. Thus the yagna was plundered.
Aftermath
The story goes on to state that Lord Brahma, calls Mahavishnu to pacify Lord Shiva. Lord shiva is pacified,when the yagna is completed in His presence and the remnants of the sacrificial oblations are offered to Him. Maheshwara, brings back Daksha to life by giving him the head of a Ramm (male goat). Daksha realizes his mistake and becomes a devotee. The severed limbs and bones of other God's and demigods are set right.
Lord Shiva in his grief, wanders with the corpse of Sati and her body parts falls in different parts of India. These places have become places of worship called Shakti Peethas. Sri Parvati is an incarnation of Sati.
This story also highlights the differing opinions of the Shivites and Vishnavite sects of Hinduism. There are different counts of who is superior and different versions of this story have been heard in various puranas.