The wand buried with Dumbledore was the Elder Wand. Malfoy disarmed him at the end of book 6, and then Dumbledore died, so the wand "thought" it's new master was Draco. Voldemort stole the Elder Wand from Dumbledore's tomb, and was using it. Harry stole Draco's wand in the Malfoy Manor, and (somehow ...