Now, how it all started is not correctly traceable. This practice of taking bath in the holy river waters was there since the time of our Puranas. The story goes that when the ocean of milk was being churned by Devas and Asuras (the demi-gods and demons) to get the nectar of immortality or Amrita, a fighting took place in between them to have the first share of it. And, to resolve the issue and make the Amrita available to Devatas only, Lord Vishnu took the shape of a beautiful angel, Mohini and alluding Asuras, flew away with the nectar. It was believed that during this incidence, the nectar or Amrit got spilled out at four different places and these four places have become holy places bestowing people with Moksha.
These four places are Haridwar, Prayag(Allahabad), Ujjain and Nasik. So bathing in the rivers of Ganga at Haridwar, Godavari at Nasik, Kshipra in Ujjain and triveni sangam or the confluence of three rivers of Ganga, Yamuna and Saraswati at Prayag has become a popular ritual belief and practice since then for attaining immortality or moksh. Since the battle took place for full 12 days and nights before Mohini flew away with the Kumbh or the pot containing the Amrit, the Kumbh Mela came to be celebrated at every 12 years. Here it is believed that the time period of one day plus one night of the Devas and Asuras was equivalent to one year of human beings. So the kumbh mela is being celebrated at a gap of twelve years.
The Kumbh at Prayag (Allahabad) is celebrated when the Sun enters Capricorn or Makar rasi. It begins on 14th January (Makar Sankranthi Day) and lasts upto Maha Shivarathri for a period of 55 days or so. The events at other three places are celebrated on different periods. At Haridwar, it is celebrated when the Sun enters Aries or Mesha rasi. At Nasik it is when Sun enters Leo or Simha rasi and at Ujjaini it is celebrated during the period when Sun is at Scorpio or Vrischik rasi.
The civic administrations make elaborate arrangements on these occasions to control the free flow of pilgrims to the ghats and for their amenities and safety. Numerous tents are erected for changing clothes and taking rest. Security posts and help lines are arranged with 24 hour service to look at their needs and problems. Even though through out the whole period is auspicious for taking the bath to attain moksh, some days are believed to be very very auspicious for attaining moksh like Makar Sankranthi, poush Poornima, Basant Panchami, Ratha Saptami, Bhisma Ekadashi and Maha Shivarathri on which days it is believed people directly get union with God after death.
P.S. Images are from google images.