They are of particular prominence in the Forgotten Realms setting, where they used to rule the world, or at least are one of the direct successors to a pre-humanoid empire, and in Eberron, where they have coatl-based good-aligned counterparts who serve the Silver Flame . In generic D&D, they are usually portrayed as descendants of mad serpent-worshipping witch-cults that fused and interbred with snakes in order to "evolve" into superior beings. Perhaps as a result of this, yuan-ti are commonly portrayed as having not only unusual, snake-based magical spells, but a natural talent for psionics.
There are roughly three tiers of Yuan-ti, based on the precise ratio of serpent to human.
Purebloods are mostly human, with minimalistic serpentine traits that are easy to conceal (a forked tongue, snake-like eyes, a body covered in very pliant scales colored like human skin, a vestigial tail, snake fang-like canines, small patches of visible scales etc). Because yuan-ti worship snakes, these guys are actually on the bottom of the pecking order in their own society, although they are useful for infiltrating humanoid societies. In 5th edition, the fact they spend a lot of time around humans, where they have much more freedom and respect than they do at home, was used as an excuse to give them PC stats.
Malisons are more drastically serpentine, which boosts them above Purebloods in the pecking order. This subspecies exemplifies the mutability of the yuan-ti; in 5th edition, at least, there are five recognized "forms" of malison, and many variations within those form archetypes. One type looks a lot like the "common" vision of a lamia, having a human upper torso and a giant snake's body in lieu of legs. Two other types look like humans with either serpent heads or serpent tails in place of arms (the mouth-handed ones are higher up the pecking order). One type looks like a human with a snake's head. And the last known type, lowliest of all, simply looks like a human with scaly skin.
Abominations are the most iconic and, in their own culture, favored of their breed. These look like either giant snakes with humanoid arms or lamias with scaly skin and a snake-like head. These guys are the undisputed top of the totem pole... except for one last class; Anathemas, at least in 5e, are essentially a hydra version of abominations; bigger, claw-fingered, and with six snake's heads in place of one. Anathemae are worshipped as demigods and are the undisputed rulers of their race.