As celegorm said, IP blocks (subnets) are allocated to organisations and therefore it's probable that you and your school have the same ISP and therefore have been given addresses from the same address space. Most schools/businesses would have bought static IP addresses, whereas your home one would be dynamic, and ordinarily these would come from different allocation pools within the ISP, but it depends how large the ISP is and how their infrastructure works - it doesn't really matter at the end of the day.