The Yellow Eyed Demon (or YED) is the name given to the higher level demon by John Winchester that has stalked the Campbell and Winchester families for 2 generations. (Season 4:3 In the Beginning) In season 2 of Supernatural we learn that the YED is actually name is Azazel.
Azazel is one of the stronger demons that walk the Earth, he was a one of the first Angels to fall and a leader in the rebellion against God.
Azazel's stated master plan was to unlock a demon gate letting loose all the demons in Hell unto Earth. In order to do so he needed a human to do it. So he made deals during his time on earth with a generation of humans which allowed him entrance into their homes. When the deals came due he entered the homes of humans and fed their children his blood, thus ensuring a generation of demon powered potential warriors at his disposal. (Season 4:3 In the Beginning) Sam Winchester was one of these kids. When Azazel was ready he brought them by groups into a deserted ghost town and pitted them against each other to weed out the weak, whomever was the sole survivor would be the leader of his army.
Azazel had gathered a following while in hell, many of whom were eager and willing to follow Sam Winchester. Azazel had high hopes for Sam and even after the Winchesters had killed a few of his children, Azazel refused to really harm Sam in hopes that he would some day lead his army of demons. Azazel is eventually killed by Dean Winchester at the the Devil's Gate, with the help of the newly released from hell John Winchester, who made a deal with Azazel to save his beloved eldest child's life at the cost of his life and soul. (Season 2.1 In My Time of Dying)
In the Season 4:3 episode In The Beginning we learn that Azazel became obsessed with a young Mary Campbell, a demon-hunter and daughter of demon-hunters who was engaged to a recently returned from Vietnam John Winchester, thus began Azazel's forty plus years of stalking the Campbell/Winchester family.
While in reality Azazel covered his tracks well not letting on even then Angels of Heaven as to what his true motives behind Sam Winchester were. When in fact by opening the Devils Gate in Wyoming he planned to release the Demon Lilith who could break the 66 seals holding his "father", Lucifer in prison. He was planning to use Sam as Lucifer's vessel once he was freed from the 66 seals.
Azazel's true form is a large mass of Black smoke. Like other demons, Azazel can manifest on earth by possessing an individual.