Harry and Draco have been friends since the start but only when alone, you see with Draco's father being a death eater it would of put a risk to Harry's safety and Draco couldn't risk his friends life, no one knew, not even Hermione and that's saying something.
Harry had been abused his whole life desperately trying to hold on, Draco was the only one able to get him to calm down when he was panicking, Hermione and Ron never noticed that they were friends and Harry had been quite surprised when they thought Harry had been sneaking around with a girl, probably the hardest he's laughed before, he said to Draco.
In 6th year when Draco had told Harry he was a death eater, He had expected Harry to freak out and not want to be friends anymore but Harry just gave a light smile and hugged him as hard as he could, he loved Draco he was his best friend how could he not, he helped with nightmares, he helped with the pain of the abuse, he helped with Harry's ptsd, and after every year they would come back to Hogwarts he would help heal Harry's wounds.
When on the Horcrux hunt Harry and Draco had been miserable without each other it was the only thing keeping them going, when Harry got back to the castle to find the missing Horcruxs he hadn't seen Draco at all until the fire in the RoR, he was so scared that Draco was hurt but his head hurt to much after they destroyed the Horcrux that he didn't notice Blaise pull Draco away from him, Draco had also been trying to find the Horcrux he wanted Voldemort gone so bad so did Blaise, they hadn't known Harry was in the room till the fire went everywhere and Harry and Ron saved them Draco was eager to see his best friend but Blaise pulled him away.
After the war they still hadn't seen each other, after Draco's mother called him to the dark side they left straight away not looking back, Draco always loved his mother, he would do anything for her.
So a few months after the war they both made their ways back to Hogwarts for their 8th year