Because they're on different networks. There are networks everywhere. Your home probably has it's own network which connects to the internet, which is a BUNCH of networks. Your school (should have) has several networks, eventually connecting to the internet.