The Sorting Hat couldn't decide if Harry was best suited to Gryffindor or Slytherin. Harry asked specifically not to be placed into Slytherin house and because he was suited to both houses his choice was taken into consideration.
One of the reasons Harry had traits of Slytherin was because he was one of Lord Voldemort's Horcruxes which meant he had a piece of Voldemort's soul inside him and so those personality traits came through.
Hogwarts' sorting hat
Harry was sorted into Gryffindor
In Harry Potter and the Philosopher's Stone, Harry was sorted into Gryffindor house in chapter seven, "The Sorting Hat".
In the Harry Potter novels, the students at the school were sorted by the putting on the Sorting Hat. The Sorting Hat would then tell each student which Hogwarts House they would join.
Terry Boot was sorted into Ravenclaw in the Fall of 1991 in Harry Potter's sorting class.
The sorting hat considered putting Harry in Slytherin, but respected Harry's wishes of not wanting to go there, and put him in Gryffindor instead.
Hogwarts' sorting hat
Harry was sorted into Gryffindor
In Harry Potter and the Philosopher's Stone, Harry was sorted into Gryffindor house in chapter seven, "The Sorting Hat".
In the Harry Potter novels, the students at the school were sorted by the putting on the Sorting Hat. The Sorting Hat would then tell each student which Hogwarts House they would join.
Hermione Granger was placed in Gryffindor House by the Sorting Hat, along with her (eventual) best friends Harry Potter and Ron Weasley. She does, however, note in Harry Potter and the Order of the Phoenix that the Sorting Hat strongly considered placing her in Ravenclaw House, which is famed for the intelligence of its students.
Terry Boot was sorted into Ravenclaw in the Fall of 1991 in Harry Potter's sorting class.
Slytherin
It showed that Harry had parts of Voldemort in him that could place him in Slytherin house. It also showed Harry had the courage unlike many before him to ask and pick his own house.
The hat is called the Sorting Hat. When placed on an incoming students head, the Sorting Hat looks at their personality and decides which Hogwarts house is best.
It is called The Sorting Hat. It places each first year into his/her house (eg. "Hufflepuff!"
Harry witnesses a burning day, when Fawkes rises again and he talked to the Sorting Hat, worried that it may have put him in the wrong house.