Heartless, are simply the darkness created in people's hearts, that is born into reality, after darkness consumes the heart. They seek to devour hearts, favoring pure ones the most.
Where did they come from?
Where exactly the Heartless came from is a mystery. It was once said that all people had only light in their hearts, but one day, they grew selfish of the light, and darkness was born in their hearts, eventually creating the Heartless.
Many many years later, a scientist named Ansem, who was the ruler of a place called Radiant Garden, began to run human experiments on the heart, and discovered the Heartless. When he saw the wrong in his research, he stopped.
However, Ansem's six apprentices: Xehanort, Braig, Dilan, Even, Aeleus, and Ienzo, secretly built a laboratory, that could manufacture Heartless, and kept up there experiments with them.
There are only two solid catagories of Heartless: Pureblood and emblem.
Pureblood Heartless are Heartless that are born naturally, right out of darkness. They are ink-black, and have yellow eyes. The tend to stay in areas of near Darkness, or at least a place saturated in it.
Emblem Heartless are the ones that Ansem's apprentices manufactured in their laboratory, and are usually shaped to a world's needs, or a specific job.
And if u want to get technical, xehanorts heartless was its own type of nobody, like he retained his human form..but sora didnt achieve this only he was self aware of him being him and kairi turned him back ( but thats not the point ) the point is after takin rikus strength and all that he showed he showed his own form on the outside. And another thing, would riku would have had the keyblade even without xehanorts heartless giving him power? Basicly my main point is wether or not xehanort was a special case there must be more heartlesss like him such as the two evil guys in the birth by sleep trailer! Ive kinda seen the signs you have to pay attention to them though. If anyone agrees with me talk to me on my mail (email@example.com ) this way we can exchange like ideas and all that. Thanks, CMH