In your example, there is a preposition (to). It depends very much on the sentence. 'school' doesn't always require a preposition:
My shchool is great.
It would depend very much on the sentence. there are nouns that are usually followed or preceeded by a preposition, but with nouns that are not, they can take prepositions according to the sentence. I am afraid that there are no rules about this that I know of- it's moe a question of learning which nouns take a preposition.