Bhagirata was the renowned king and forefather of Rama of Raghu Vamsa. His forefathers known as Sagaras were burnt down due to a curse. In order to uplift his ancestors from the curse and finally get them to heaven, he wanted to bring the river Ganges to earth. The concept is that when the waters of the Ganges touch the ash of Sagaras, they would be uplifted from their sin.
Bhagirata performed very severe austerities to get Indra's acceptance. He gave permission to bring the Ganges to the earth. However, the decision of coming down to earth would be Ganga's. So Bhagirata again started his penance and prayed to the Goddess to descend. She agreed to come down, but he was warned that earth would not withstand the force with which she would descend.
Bhagirata worshipped Lord shiva for help. He performed severe austerities to pleasing Lord Shiva. Shiva was pleased with his devotion and agreed to hold the Ganges when she descends to earth. Ganges blinded by her own pride and ignorance thought that the Lord wouldn't be able to withstand the force! She descended with an intention to flow down with heavy force on the Lord.
Lord Shiva, the creator of the entire universe arrested her flow in His Jatamukuta! She tried her best to release herself only to get locked further.Bhagirata, prayed to the Lord to show mercy on the Goddess and release her. Ganges flowed gently down from his matted locks to purify the earth and the Sagaras off their sins. Ganges then flowed gracefully and blessed Patala with her waters. Thus the ancestors of Bhagirata were resurrected by the holy water of the Ganges.
Shiva sculptures depict Ganges in Shiva's Jatamukuta. This is most often seen in the Nataraja sculptures with Ganges on one side and the crescent moon on the other!