Origins of the Ainur
The Ainur were the first, and mightiest, beings created by Ilúvatar before the beginning of the World. The Ainur were the 'offspring of Ilúvatar's thought', and each was given understanding only of that part of the mind of Ilúvatar from which they came. The exception to this was Melkor, the greatest of the Ainur, who had a part of the gifts of all the others.
The Ainur were 'kindled with the Flame Imperishable', which can be taken to mean that they were granted free will by their creator. Ilúvatar instructed them in music, until he brought them together to make the Music of the Ainur; the great song that created the Vision of Ilúvatar and ultimately the real World.
The Ainur and the World
Through the Music of the Ainur, Ilúvatar created a Vision of the World, and explained much of its nature and destiny to them - so the Ainur have much knowledge of the World, but are not omniscient. Then, Ilúvatar granted the World true being. Many of the mighty Ainur desired to descend into it and form it in readiness for the coming of the Children of Ilúvatar (Elves and Men). Fourteen of these great Ainur became the Valar, or Powers of Arda. The fifteenth, Melkor, turned aside from that path and became the first Dark Lord. The many lesser Ainur that accompanied the Valar into Arda are known as Maiar.
Those Ainur who entered the World at its beginning remain bound to it until its end. Though Melkor and his followers like Mairon, were eventually thrown into the Void by the others, he is prophesied to return before the end. Little is known of the ultimate future of the Ainur, even by themselves, but it is said that, after the great battle at the end of the World, they will make a Second, even greater, Music with the Children of Ilúvatar.
The Ainur are angelic beings, nonetheless they do possess gender. Those who later descended to Arda took on common male and female forms to appear to the Elves in, and have an inherent male or female gender even when formless. This is because their gender is based on their being, which is independent of any physical form they may assume.
Nature of the Ainur
The Ainur are fëar and are immortal, but unlike the Children of Ilúvatar, they do not actually need hröar. Nevertheless, they can take tangible physical form, but this is a manifestation of their spirit and they do not technically have bodies the way Elves and Men do. As such, an Ainu cannot quite be killed. However, Ainur's spirits can be weakened, in ways that hinder their ability to take shapes, influence the world, or even affect the world at all.
For example, Sauron's spirit was repeatedly weakened by successive damage in the Downfall of Númenor, his defeat in the War of the Last Alliance, and finally with the destruction of the One Ring. None of these things killed Sauron outright. But the Downfall of Númenor destroyed his ability to take fair form, the War of the Last Alliance destroyed his ability to take physical form, and finally the destruction of the One Ring broke his ability to affect the world at all, reducing his spirit to a state that could no longer do harm.
Melkor though was the most powerful of the Ainur (greater than the rest of the Valar combined), and his spirit, instead of fading away, was exiled from Arda altogether through the Door of Night into the Void. The Vala Mandos prophesied that Melkor would return at the Dagor Dagorath in Arda's last days, and would revive the spirits of Sauron, Gothmog and all his former servants for one final confrontation against the Valar and the Children of Ilúvatar.
The Line of Melian
One of the Maiar named Melian, alone of all the Ainur, wedded an Elf, King Elu Thingol of Doriath. From her, a strain of the Ainur entered the bloodlines of the Elves and Men, passed down through generations. Elrond and Elros were Melian's descendants as well as the Kings of Númenor and their heirs.
Supposedly it is derived from the original Valarin word for Ainur which was Ayanûz.
They are also referred to as Great Ones or Holy Ones.