Namine was a girl who worked for the organization. They wanted her to take the chains of memories in Soras heart and play mix + match. (or, she took the events/ppl in Soras memories and switched them w/ stuff she made up to get him screwed up) This way Sora would be like a puppet to the Organization, kinda like Riku was to Ansem, but in a different term; No one is controlling Soras body
(SPOILER)
eventually, she turns her bak on the Organization, and puts Soras memories bak, but heck, thas life 4 ya
(END SPOILER)