In the Vedas, the apsaras are water nymphs, often married to the gandharvas. By the time the Puranas and the two epics were composed, the apsaras and gandharvas had become performing artists to the gods; the apsaras are singers, dancers, and courtesans, while the gandharvas are musicians. They are somewhat semi-divine; we do not see them as being able to curse humans (except on one occasion) or grant them boons as gods can, but we do see them as adept in magic and knowledgeable in all of the 64 performing arts; additionally, we see many gandharvas skilled in warfare.
IN THE VEDAS
The oldest conception of the apsaras is as river nymphs, and companions to the gandharvas. They are also seen to live on trees, such as the banyan and the sacred fig, and are entreated to bless wedding processions. Apsaras dance, sing, and play around. They are exceedingly beautiful, and because they can cause mental derangement, they are beings who are to be feared. The Rig Veda mentions one apsara by name; she is Urvasi, wife to Pururava, who is an ancestor of the Kauravas and Pandavas. The story is that Urvasi lived with Pururava, a human king, for a while and then left him to return to her apsara and gandharva companions. The distraught Pururava, while wandering around in a forest, spotted Urvasi playing in a river with her friends, and begged her to return to the palace with him. She refused.
किमेता वाचा कृणवा तवाहं प्राक्रमिषमुषसामग्रियेव । पुरूरवः पुनरस्तं परेहि दुरापना वात इवाहमस्मि ॥
न वै स्त्रैणानि सख्यानि सन्ति सालावृकाणां हृदयान्येता ॥
I have moved on from you like the first rays of dawn. Go home, Pururava; I am as hard to catch as the wind.
Female friendship does not exist; their hearts are the hearts of jackals. [Rig Veda, 10.95]
The gandharvas are companions to the apsaras. They are handsome, possess brilliant weapons, and wear fragrant clothes. They guard the Soma but do not have the right to drink it. How they lost this right has a story: in one version, the gandharvas failed to guard the Soma properly, resulting in it being stolen. Indra brought back the Soma and, as a punishment for their dereliction of duty, the gandharvas were excluded from the Soma draught. In another version, the gandharvas were the original owners of the Soma. They sold it to the gods in exchange for a goddess - the goddess Vach (speech) - because they are very fond of female company.
Some scholars trace the origin of the gandharvas to the Indo-Iranian period because the Avesta contains references to a similar being (although in the singular, not plural) called Gandarewa who lives in the sea of white Haoma (Soma).
In later literature
In the epics and the Puranas, the apsaras and gandharvas are artistes who perform at the court of Indra and other gods. They are also seen to sing and dance on other happy occasions such as births and weddings of the gods and also of humans particularly favoured by the gods. Additionally, the apsaras are courtesans to the gods and are frequently employed by Indra to distract kings and sages who Indra fears to be progressing along the path of divinity (and hence capable of depriving Indra of his throne). The Kuru-Pandava teacher Drona was born because his father lost control on seeing an apsara; the famous queen Shakuntala was born of an apsara whom Indra sent to seduce the great sage Vishwamitra (Shakuntala's son Bharat was an ancestor of the Kuru-Pandavas; the country, India, is named after Bharat). An apsara called Tilottama was specially created from the essence of all that is good in all the objects of the universe (til = particle, uttam = best, tilottama = she of the best of all materials) to distract two demon brothers who were causing major grief to the gods; the brothers fought over her and, in the duel, killed each other.
The gandharvas are musicians par excellence. When Arjuna, the third Pandava, went to the heavens in search of celestial weapons, the gandharvas at Indra's court taught him singing and dancing. The gandharvas are good warriors as well. The Kuru prince and heir apparent, Chitrangad, was killed in a battle by a gandharva of the same name. Another gandharva gave an enchanted war chariot and some divine weapons to Arjuna, and on another occasion, imprisoned Duryodhana and his whole pleasure camp when the two groups entered into a dispute over the rights to a picnic spot.
Perhaps because of their somewhat frivolous nature, both apsaras and gandharvas frequently run afoul of the more staid sages and are cursed by them to be born on earth as trees, animals, or deformed beings, redeemable after thousands of years by the touch or grace of an incarnate god or a human hero.
In modern times
The word apsara is used in Hindi, and other similar languages descended from the Indo-European, to generally denote an exceedingly beautiful woman or a talented dancer.