According to Ramayana, Lord Rama, Sita and Lakshmana was asked by Queen Mother Kaikeyi to leave the Kingdom of Ayodhya and go on an exile to the forest for 14 years.
When Rama, Sita and Lakshmana went on exile, they set up a hut in Panchavati, an area near Nashik. Lord Rama is an avatar (incarnation) of the Supreme Lord Sriman Narayana who ruled the Earth as a very righteous King. Lord Rama is a descendant of Ajapti, grand father of Lord Rama.