A Jain statue, possibly Mahavira, from about 1200 AD
Nobody knows when people first began to follow Jain ideas. Some Jain traditions take their history back to about 2000 BC, in the Harappan period. The first definite evidence of Jain faith, though, comes from about 650 BC, with the Jain leader Parshvanatha. We don't know much for sure about Parshvanatha, though. After Parshvanatha, there was another Jain leader, Mahavira, who probably lived in the 500s BC, about the same time as the Buddha.
According to Jain traditions, Mahavira was born in eastern India to the soldier caste, but when he was thirty years old he gave up being a soldier to live a holy life. When Mahavira was 70 years old, he decided to die and stopped eating. Jainism grew out of Hinduism, so that Jains, like Hindus, believed in reincarnation - that your soul would come back to earth in another body after you died. But like Buddhists, Jains devoted themselves to being good so they could escape reincarnation and go to heaven instead. Jains did not worship the Hindu gods Shiva or Vishnu, instead worshiping human souls that had escaped reincarnation, called Tirthankars.
Jains were particularly known for their respect for all forms of life. To show their respect, Jains wouldn't kill any living thing, so all Jains were vegetarians and some Jains even wore masks so they wouldn't accidentally breathe in a bug and kill it, or swept the ground in front of themselves as they walked so they wouldn't accidentally step on a caterpillar.
People who followed Jainism followed many other special rules too. For instance, they tried never to hurt anybody or any animal or plant unnecessarily, including hurting their feelings. Jains did not drink alcohol, and they tried not to travel or eat after dark. Jains were supposed to always tell the truth and not cheat or steal. Jains were faithful to their husbands or wives, and tried not to be greedy about anything that pleased the body, like food or fashionable clothes.
Jains also tried not to be greedy about possessions - they wanted to live as though they were poor, without spending a lot of money, or having a big fancy house. They tried to re-use and recycle things if they did have them. When they got old, many Jains stopped eating in order to die like Mahavira.
Although there never got to be very many Jains, they continued their faith throughout the Indian Middle Ages. Around the 300s AD, many Jains left eastern India and settled in western India instead. Between 800 and 1100 AD, Jain priests carved rock-cut temples at Ellora in north-western India. Even after the Muslim conquest of northern India, some people still continued the Jain tradition.