Xehanort is Ansem the Wise's apprentice, and the series' central antagonist across its various forms.
Ansem warned him that his experiments had gone too far. Xehanort ignored the warning, gave in to darkness and became a Heartless — then took the name Ansem for himself, which is why the two are so easily confused. Sora defeated that Heartless in the first game.
His Nobody, Xemnas, is the stronger of the pair and leads Organization XIII. Sora beat him as well, at the end of Kingdom Hearts II, though the story is far from finished with either.