Wie kommst du zur Schule?
This means "How do you come to school?" Here you literally ask for the way that a pupil has to take from home (or where ever he/she is) to the school-building. So this might be a correct answer:
"I walk trough the forest, then I swim through the river and then I walk 3 miles. For the rest I take the bus."
Wie kommst du in die Schule?
This means "How do you come into school?" Here you literally ask how the pupil enters the building. A correct answer to that question might be:
"I climb up the walls, and pass through the open window in 2nd floor."
BUT: Most German native speakers mix up both meanings. So you can use both sentences in both meanings.
And there is another interesting fact to know about those two sentences:
Your example-sentences are a famous example of differences between two variations of German LAnguage: "bundesdeutsches Deutsch" (spoken in Germany, Luxembourg an Belgium) and "österreichisches Deutsch" (spoken in Austria and northern parts of Italy). (There is also a third variaton, "schweizerisches Deutsch" that is spoken in Switzerland and Liechtenstein). You can think of this variations similar to american and british English or portuguese and brazilian Portuguese.
If you want to say that a child is old enough to go to school (so no longer goes to kindergarden) you say: "Tom goes to school". If you translate this simple sentence into german, you get two different sentences with the same meaning, depending on the variation of German.
In Germany the sentence "Tom goes to school" is:
Tom geht zur Schule.
If you say that in Austria, Austrian people (like me) will understand: "Tom walks to the schoolhouse (but he does not enter the building)".
So in Austria you should translate "Tom goes to school" this way:
Tom geht in die Schule.
Now it is clear, that he won't stop in front of the building. "Tom geht in die Schule." is the correct way to say "Tom goes to school" in Austria. But German people would understand "Tom goes into the schoolhouse" which is not the same as "Tom goes to school".