Upon arrival at Hogwarts School of Witchcraft and Wizardry, first-year students are sorted into one of the four Hogwarts houses (Gryffindor, Ravenclaw, Hufflepuff, and Slytherin) by way of the Sorting Hat. As you may recall, Harry Potter is faced with the prospect of being assigned to Slytherin House when the Sorting Hat is placed on his head. Having heard about the evil witches and wizards that Slytherin seems to produce, Harry tells the Sorting Hat that any house will do as long as he is not placed in Slytherin. As a result, he is sorted into Gryffindor House. When Harry Potter meets Tom Riddle (He-Who-Must-Not-Be-Named in his much younger, school-boy form), he notices that he and Tom, a Slytherin, have a few things in common. Unnerved, he voices his concerns to Dumbledore.
"So I should be in Slytherin," Harry said, looking desperately into Dumbledore's face. "The Sorting Hat could see Slytherin's power in me, and it --"
"Put you in Gryffindor," said Dumbledore calmly. "Listen to me, Harry. You happen to have many qualities Salazar Slytherin prized in his hand-picked students. His own very rare gift, Parseltongue - resourcefulness - determination - a certain disregard for the rules," he added, his mustache quivering again. "Yet the Sorting Hat placed you in Gryffindor. You know why that was. Think."
"It only put me in Gryffindor," said Harry in a defeated voice, "because I asked not to go in Slytherin..."
"Exactly," said Dumbledore, beaming once more. "Which makes you very different from Tom Riddle. It is our choices, Harry, that show what we truly are, far more than our abilities."