Eldar (known as Aeldari in their language) are an ancient Xenos race that predates humanity and Chaos. They are all psychically active and have some of the most advanced technology in the galaxy. After the War in Heaven and the Fall of the Eldar, they are a shadow of their former selves.
The War in Heaven
During the Necrons' war with the Old Ones, the Eldar fought against their mechanical foes after having developed a material called wraithbone that could be shaped by their psychic might. The Eldar gods fought against the C'Tan, and while victorious, the war left a lasting impact on the galaxy as a whole, the Eldar included. The Eldar claimed the Old Ones' Webway system for themselves, gaining access to a transdimensional realm that lay between realspace and the now increasingly dangerous Warp.
After the War, Khaine was told of a prophecy that the Eldar would one day kill him. To stop him from destroying the Eldar race, Asuryan placed a boundary between the Eldar and their gods, preventing them from entering realspace or interacting with mortals.
Fall of the Eldar
Over the millennia, without any race to rival them, the Eldar became decadent and hedonistic, engaging in orgies of violence and sadomasichism that increased in intensity with each generation. Combined with their powerful psychic presence, this eventually caused the Chaos God Slaanesh to be born. Slaanesh destroyed the heart of the Eldar Empire by consuming the souls of its inhabitants, creating a massive warp storm known as the Eye of Terror. Slaanesh also consumed all of the Eldar Gods save for Khaine, Isha, and Cegorach. The Eldar who survived by escaping the Eye of Terror fractured into multiple factions, a pale shadow of their former glory.
An ancient Eldar prophecy claims that Slaanesh will finally be defeated when the souls of the Eldar that have been hidden from the Chaos God will combine to form a new god: Ynnead, the Eldar god of Death. Ynnead was tentatively formed as part of a ritual by Eldrad in an attempt to summon the God early, and though the aftermath caused the craftworld Biel-Tan to be in ruins and for the city of Commoragh to be thrown into chaos, a new Eldar faction arose under the newborn god that have dedicated themselves to slaying the Dark Prince. These Ynnari have a shaky coalition with the Imperium of Man, but have proven themselves to be formidable as a force unto themselves.
The Eldar pantheon once had far more members, but by the 41st millennium only a handful survived:
The Eldar split into the following groups:
Most Eldar live on the craft worlds, massive world-ships that were able to escape the Eye of Terror. They live disciplined lives known as "paths" as a means to keep Slaanesh from hungering for their souls. When they die, their souls are captured in spirit stones and added to the craftworld's infinity matrix. Those on the Path of the Warrior are called Aspect Warriors, and will specialize in various different tactics. The Eldar also have a militia called Guardians, and spirit-powered automatons called wraiths. Those who specialize in psychic powers are Warlocks, with the mightiest becoming Farseers able to see into the future.
The Emperor is fine in theory with Eldar, if it weren't for the fact that they're smug assholes who want to put humans in zoos. In fact, one of his goals with building the Human webway was to obtain Eldar Prostitutes since they could handle his intense libido better than human women.
Called the Drukharii in the Eldar language, those Eldar who had escaped into the Webway founded their own city called Commorragh, and not only did they continue their hedonistic ways, they also discovered that torturing others would temporarily keep Slaanesh away from their souls. As such, they've taken to slaving and piracy, becoming a scourge for innocent populations. However, they have also psychically atrophied, as using their psychic powers without the protection of controlled emotions is inherently dangerous.
The Emperor refers to the Dark Eldar as "completely unnecessary" and a bunch of "coked-up BDSM enthusiasts." Their names for their weaponry are likewise mocked as "childishly grim."
Harlequins serve the god Cegorach, and act as diplomats for the other Eldar factions. They are entertainers, historians, and cunning warriors. Cegorach protects their souls from Slaanesh, save for the Solitaires, who are doomed to lose their souls. Solitaires are the only Harlequins that can play Slaanesh in their dances, as anyone else will be driven insane by the performance. The Harlequins protect the Black Library, an important source of knowledge about Chaos.
The Exodites were among the first to realize how much trouble the Eldar Empire was in, and exiled themselves onto the maiden worlds. Their technology is less advanced than their cousins, but they have mastered using the native flora and fauna of their planets to stave off invaders. They also use their own version of the infinity circuit, a crystalline structure built into the planet that allows them to control its wildlife.
Craftworld Eldar who want to break free of the disciplined ways of their people will choose the path of the exile, and will become adventurers and pirates. This lifestyle is quite risky as they have no protection against Slaanesh, though they will frequently aid their homeworld in times of need. Either they return home once their wanderlust is sated, or they become Dark Eldar.
With the birth of Ynnead, Eldar from all walks of life gathered to him to serve and fight against Slaanesh.
The Ynnari do not yet exist in TTS as the story content for Gathering Storm has yet to take place.