What is the duty of Indra given by God & what is in Indraloka that all rakhshasas and asuras want to win Indraloka? Do they get any power if they win Indraloka or is there anything like whoever wins Indraloka also rule Prithviloka?
Indra is also called Surendra or Devendra meaning lord of celestials. The duties of Indra are said in Vanaparva of Mahabharata.
When Skanda was born, all the celestials and rishis were happy that they found a mighty being who could slay Tarakasura who was a huge problem for the lokas at that moment. As he found many followers and dispelled the fears of devas and rishis with a short period of time, they ask him to be their leader. Then Kartikeya asked what are the duties of Indra.
Skanda replied, 'You gentlemen of great ascetic wealth (tell me) what Indra does with all three worlds and how that sovereign of the celestials protects the hosts of gods unremittingly.'
To this rishis replied with the duties of Indra:
'Indra is the giver of strength, power, children and happiness to all creatures and when propitiated, that Lord of the celestials bestows on all the objects of their desire. He destroys the wicked and fulfils the desires of the righteous; and that Destroyer of Vala assigns to all creatures their various duties. He officiates for the sun and the moon in places where there is no sun or moon; he even when occasion requires it, acts for (serves the purposes of) fire, air, earth, and water. These are the duties of Indra; his capacities are immense.
In addition to what Sarvavouma has mentioned, I am adding the following informations:
1.Another famous name of Indra is 'Purandara'.
purANi [ariNAm] dArayati iti purandarah : meaning that who destroys the abodes of the enemies is Purandara, ie Indra (Reference : Sri Sri ChanNdi, Udbodhan, page 83).
When Mahishasura defeated the deva-s,
he became the 'Indra' (Devi-Mahatmya, Machapter 2, Mantra 3)
All the devas incuding Surya,Indra, Agni, Vayu,Chandra, Yama and Varuna came to the earth and started to reside as ordinary human beings.(Ibid.Mantras 6-7).
So yes,whoever wins Indraloka seems to win the Prithviloka as well as all the devas are then driven out of the heaven.Only Brahma, Vishnu and Maheswara resided in their own lokas.They by their combined Aura along with the Aura of all deva-s created Devi Mahalakshmi Who slayed Mahishasura and returned the kingdom of heaven to the original Indra.
The Uttara-Charitra of Devi-Mahatmya mentions it more explicitly:
When Shumbha and Nishumbha defeated the deva-s,Indra,the husband of Sachi, lost his control on the three lokas (svarga-Martya-PAtAla) and the shares of the yajnas.(Chapter 5,mantra 2)
(Reference: Sri Sri Chandi,/Devi-Mahatmya,Madhyama Charitra, Udbodhan).
As described in the Shiva Purana, Indra's duty was managing all kind of activity of world(Brahmand). Indraloka is the center of World and Capital of world. Who sits on Indrasan (seat of Indra) they get the power of Indra. That's why all asuras want to win Indraloka.
The Gods have Amrita which gives immortality. When you conquer Indraloka I believe you get the source. One reason the asuras are always fighting for Indraloka and always losing. Besides Amrita there's numerous other divine treasures in Indraloka. A wealth of material and spiritual power. It's full of divine sages, apsaras, this doesn't change when Indra leaves as we know from the incident when Nahusha replaced Indra. It's basically the same job as being an earthly king. You get to indulge in any number of worldly pleasures. Deal with petitions from various groups in need, entertain visiting sages, the occasional curse. We know it involves almost unlimited power because Indra becomes more and more arrogant over time. Presiding over any number of sacrifices.