When universities assess your application, they usually are familiar with your high school. Most good high schools send out a legend with your transcript and a school profile. My high school sends 99% to higher education so even if you aren't in the top five or top ten, people still get in good places. We send like 10 to ivies every year, 10 to Berkley, 10 to UCLA, 10 to UCSD, 10 to USC, others to random UC's and Pasadena City College and a couple of students to Oxbridge/St. Andrews/foreign schools (though a student in '05 was the first to be admitted to Oxford from our school and I was the first St. Andrews-lite. We started a UK trend!)
Conversely, if you have achieved amazing things at a rural high school in Mississipi where everyone drop outs and gets pregnant, that'll give you major brownie points on your application.