I f you say you are going to (my) school , we know that you are refering to your school eventhough you didnt say which school . Its implied from the context .
If you want to learn English , then why dont you go to school > meaning go to A school and learn ( any school ) .
When you say I am going to THE school , we know you are going to A particular school , but you did not say which one.
I can then ask you ," What do you mean 'The school ' ? Which school are you refering to?"
"Sorry , I mean THE school that is having the games today "
"The" +school (noun) points to ONE particular school that is in your mind when you are saying it.
I am going to (my) school to get my car so I can go to THE school that has invited me to visit.
Your misunderstending in usage of the word is just the word "The + noun)" .