"Идти" is imperfective, while "пойти" is perfective. "Идти в школу" means "to go to school" / "to be going to school" and focuses on the action of going itself, while "Пойти в школу" focuses more on the destination (the school) and implies that you will reach the destination. "Я иду в школу" = "I am going to school" / "I go to school", "Я пойду в школу" = "I will go to school".
"Я шел в школу" = "I went to school", "Я пошел в школу" = "I have started the process of going to the school (and with the intention of reaching the school)".