In teh case of state schools:
Primary school:escuela is what people usually refer to but the oficial term for a primary school is Colegio Público (de educación infantil y primaria)
Secondary school: Instituto de educación secundaria
For schools in private sector, it varies widely, but the secondary schools aren't called Institutos, and are more likely to be called Colegio as usually they offer primary and secondary education.