To translate something, you have to not only get the word-by-word meanings right, you have to understand the difference in sentence structures and make sure to move the words around correctly.
When trying to understand a sentence in Japanese, always start with the final verb and build on that. In this case, the verb is あります - "[there] is".
Building on that, the two main things are the subject - 何 - and the fact that it's a question, thanks to the sentence-end particle か. So adding those in, you get "What is [there]?".
Then we add the "fluff" - the additional information marked with particles like に, any relative clauses, and other stuff that adds detail to the main sentence. In this case, we have あなたの学校に - "at your school".
So our final sentence is "What is there at your school?", which depending on context might just become "What does your school have?" or something similar.