Slytherins tend to be ambitious, shrewd, cunning, strong leaders, and achievement-oriented. They also have highly developed senses of self-preservation.This means that Slytherins tend to hesitate before acting, so as to weigh all possible outcomes of a decision (and how these outcomes would personally impact them), unlike Gryffindors, whose reckless natures would likely lead them to react immediately and instinctively without thinking through what exactly should be done.
According to Albus Dumbledore, the qualities which Salazar valued in the students he chose included cleverness, resourcefulness, determination, and "a certain disregard for the rules." Dumbledore noted that all of these were qualities possessed by Harry Potter, who was in Gryffindor.
"I always knew Salazar Slytherin was a twisted old loony, but I never knew he started all this pure-blood stuff. I wouldn't be in his house if you paid me. Honestly, if the Sorting Hat had tried to put me in Slytherin, I'd've got the train straight back home..."
Contrary to the wishes of the other founders of Hogwarts School of Witchcraft and Wizardry, Salazar Slytherinwanted a stricter policy of admission to the school —one limited strictly to pure-blood students. The controversy this created apparently led to Salazar leaving the school and the Chamber of Secrets behind. A millennium later, the house's students are still considered affiliated with Salazar's reputed views, and open expression of pro-blood purity sentiment does seem to be more common in Slytherin than in other Houses.
This disagreement over blood purity, which caused Salazar Slytherin's friendship with Godric Gryffindor to break, is the origin of the feud between Slytherin and Gryffindor, the two most competitive of the houses. Slytherin and Gryffindor are generally rivals in Quidditch and for the House Cup, which the former had won six years in a row prior to Harry Potter's arrival at Hogwarts in 1991. It is also rare for Slytherin and Gryffindor students to be friendly with one another, and common for them to share animosity. This was particularly the case during the First andSecond Wizarding Wars; during the latter conflict, no Slytherin students joined Dumbledore's Army, which had Gryffindor, Ravenclaw, and Hufflepuff members, and some Slytherins declined to defend their school in the Battle of Hogwarts, with some joining the Death Eaters. However, there are exceptions, such as Slytherin Severus Snapeand Gryffindor Lily Evans, who were best friends until Snape's use of the slur "Mudblood" and his aspirations to be a Death Eater caused Lily to sever their ties.
It's said that all Dark Wizards were in Slytherin (except Peter Pettigrew), though how many were from this house before Tom Marvolo Riddle began recruiting Death Eaters there is unstated. As Slytherin was his own House, it was certainly most easy for him to recruit there.
It might also be possible (though unlikely) that the Sorting Hat simply sorts anyone with ill intentions into Slytherin, regardless of whether they possess cunning and ambition. Vincent Crabbe and Gregory Goyle were both incredibly stupid and lacking in tact, but still sorted into Slytherin.
Cunning and ambition are easily turned towards ill purposes, but are not inherently negative; furthermore, daring, intelligence, and loyalty can as easily become negative. A reason Slytherins may be thought less of by people is perhaps because many of them seem to value their own lives more than the lives of others. When Harry was trying to run away, because he was afraid that his presence was putting his friends in danger, Phineas Nigellus saw him and said, "We Slytherins are brave, yes, but not stupid. For instance, when given the choice, we will always choose to save our own necks." There are exceptions to this rule however, such as Snape, who Harry said was a "Slytherin and...probably the bravest man I ever knew" and Regulus Black, who gave his life in an attempt to destroy one of the Horcruxes of Lord Voldemort.
The truth is that while most Dark wizards are Slytherins, most Slytherins are not Dark, and smaller groups of Voldemort's supporters are aligned with other Houses. During the Battle of Hogwarts, while all of the Slytherin students left the school before the fighting started, several of them did return with the Hogsmeade reinforcements to join the fight against Voldemort and his Death Eaters; although whilst in the Shreking Shack, Voldemort commented that many had come to join his forces. Furthermore, it should be noted that the acting head at the time ordered the entire house to leave due to a single Slytherin student suggesting the student body hand Harry Potter to Voldemort.