Harry was not a HorcruxHorcux in the formal definition of the word but, because he was entirelyentirelty unique (having a slice of soul intended for a Horcruxhorcux dwell inside of him for 17 years), it is easy to lump him in with Horcruxeshorcuxes for brevity. As several other answers have quoted, Dumbledore was not saying that Harry was a dark magical container for Voldemort'sVoldemorts soul fragment that Voldemort used the HorcruxHorcux spell to create. Nor, was Harry possessed by Voldemort because of the soul fragment. We know this because Harry was possessed by Voldemort in the fifthFifth book and it was a completely new and terrifying experience for him (and Voldemort for that matter).
Instead, like a Horcrux,Horcux Harry possessed a fragment of Voldemort's soul that would tetherteather Voldemort to life while still in Harry, and other than the fact that if Harry had died Voldemort's soul fragment would also have been destroyed duedistoryed do to lack of container—thatcontainer--that is where the similarities stop. Harry experiences visions of Voldemort's emotions, and circumstancescircumastances but through the lenslense of his own brain, morals, and personality and was never swayed to agreeing with the values, actions, or emotions of Voldemort's soul fragment. There is a spot where he didn't even realizerealse he was feeling elation from Voldemort's soul connection because he himself was so miserable. Harry felt the feeling from the soul tie but it didn't affecteffect his misery at all (so much so he couldn't even recognizerecogize the physicalphysicial/mental symptoms as happiness until much later).
He didn't have a negative effect on those around him. There is a theory that him being a Horcrux Horcux(which he is not) is why the DursleysThe Durselys were so awful, but it doesn't hold any water as Harry'sHarrys presence doesn't affecteffect his dormmatesdormates, the Weasleys, SiriusSirus, or Ron/Hermione when they stay /live together at various points in the books. The fragment of soul has the opposite effect in fact;fact, it integratedintergrated into Harry's mind, body, and soul, adding skills and, aptitudes to his innate gifting as well as insight to know and understand his greatest enemy that no other person would have ever known because Voldemort was so private and secretive. So much so that Dumbledore says Voldemort's closest followers would give anything to have Harry's insight into their master'smasters private world. This point (the soul's integrationsouls intergration into him rather than him being tainted by itsit presence) is proven by his abilityablity to produce a Patronuspatronus even with a piece of the evilest soul in history cohabitating with his soul. Patronuses are not only hard magic but only people with pure hearts are able to cast them, and by pure 'heart' I think they are actually referring to whole souls.
The biggest thing that should leave us without a shadow of a doubt that Harry isn't a true HorcruxHorcux is that he was able to die for the people in the Hogwartshogwarts battle and invoke the deep love magic that serves as magicalmagic protection against the killing curse/evil magic. If Harry was a Horcrux,horcux which is intrinsically bad, dark magic—evil—hemagic- evil he would have beenbe unable to access the opposite power magically:- love. His Horcruxnesshorcuxness would have inhibited it; insteadit, instead it cleansed him of the piece of soul that never belonged, thus the power of love always being stronger and more far-reaching reaching than the powers of darkness and evil, in ways that evil cannot even conceiveconcieve or imagine.
As for how a slice of Voldemort's soul ended up in Harry I believe that it is necessary to understand that souls are fundamentally meant to be whole and do not opporate properly once torn, split or removed. Voldemort, who separted his soul's worth from his physical existence, devalued his soul to the point of loosing touch/control over it. When Riddle made the 1st Horcux (most likely the ring) I am sure the slice to his soul cost him alot. (if healing a ripped soul can kill you with the pain then ripping it out also must cost alot) whether pain or something else, there is a theory that I think has merit-- but I cannot remember the source so if anyone else knows it please add--that Voldemort had to give up something physically each time he ripped out a bit of his soul to encase in a horcux- and you didn't know what part of yourself you were going to give up because you couldn't predict what part of your soul you would break off/ encapsulate. So each time he did the horcux spell I think it was like a unbreakable vow or a blank check to give up the portion of his physicality that the fragment of his soul represented. There was no obvious phyiscal sign of from his first horcux (because we see him interact with Sugghorn and with Hepzibah in the memories in HBP so it could have been castration or anything not immediately obvious or Voldemort could have hid it with magic. I believe with the diary he had to give blood,if not all his blood alot of blood enough blood to write the entire story. The Locket could have been when his eyes went from human to red. We know is horcuxed changed him phyically because when he goes into see Dumbledore to hide the tiara his face is waxey although still recognizable but not the handsome boy/man he used to be. So I think eventually he had to give; his hair, his pigment, his blood, his eyes, his ablity to reproduce, and his human voice to his horcuxes before Harry ( I don't know what he gave to Nagini in his prebody state maybe this was his hair and his nose should have been on the previous list). Anyways with all that in mind back to the question at hand how did Harry come to have a fragment of Voldemorts soul attach to him? I think there are several possiblities but the 1st is that Voldemorts soul had become so wrecked so unstable and unable to do what a soul is supposed to do that when he tried to kill a baby after just murdering a woman he didn't even need to- his soul broke off a piece due to the shear gravity of the travisty he was commiting even though it didn't work but he himself died. The soul was able to attach to Harry's soul because Voldemort forfeited his entire body in the process. Seems like it would have been mentioned if they had found Voldemort's body at the Potter's house- since it never was lets assumed it wasn't found. Voldemort says, >"Aaah … pain beyond pain, my friends; nothing could have prepared me for it. I was ripped from my body, I was less than spirit, less than the meanest ghost … but still, I was alive. What I was, even I do not know … I, who have gone further than anybody along the path that leads to immortality. You know my goal – to conquer death. And now, I was tested, and it appeared that one or more of my experiments worked … for I had not been killed, though the curse should have done it. Nevertheless, I was as powerless as the weakest creature alive…” (GF33)< So Voldemort himself says the remainder of his soul was ripped from his body and then we have to assume he(his remain 7th of his unecapsalted soul) somehow fled to Albania leaving both his body and a fragment of his soul that had broken off due to how horribly degrating his actions in the Potter house were to even his irreprensively damaged soul. Voldemort was both so out of touch with his own soul and the splitting was so complete that he didn't even realize he was leaving a piece behind (also with no ablity to reintegrate into himself because after so many horcuxes he was incable of remorse you need a soul for that.) So, that portion of soul used his body as payment to latch onto Harry (magical memory like harry's wand recognizing an enemy, Voldemorts soul knew what it was magically supposed to do when split and then ripped out of his body - bind itself to something else magical using voldemort's physical self as prearranged payement.) But because no dark spell was used in the binding no dark object was created in the soul attatching itself to harry. Making Harry like a horcux but also not a horcux at all.
The other idea is that he has the sword of Gryffindor with him and he was prepared to create his final horcux, in his plan of a seven piece soul, when he killed Harry (and therefore the vality of the prophecy that anyone could defeat him). So regarless of wheather there is horcux prep (meaning you have to do some dark magic before the killing that splits the soul so that you can do more dark magic to incase it in a magical object making it a horcux) or not perhapse when the spell backfired and killed him leaving his unstable soul to cleave from his body perhaps the death still split his soul and the part that he intended (and possibly prepared) for the horcux he was going to make indeed did make a clean split so by the time he was ripped from his body Voldemort wasn't intouch with both of his pieces of soul. He suceeding in creating his 7 part soul but never had the chance to encapselate it.The rest of the theory is the same from my point of view; his body paid the magical payment to bind this split part to a magical thing in the room, no dark spell meant I couldn't bind itself to an object but a person might have been diffent so to Harry it went taking the entire physical body of Tom Riddle as magical payment for its continued existence in Harry.