What @Ringo is saying is basically true in your example, but what if you are talking about something different? Which verb do you choose then? First let's look at your two sentences and think about what Ringo said:
a) I Went to school, When principal arrived at my home.
b) I had gone to school, when principal arrived at my home.
These two sentences are almost the same. How are they different?
They are different because the word "go" has a different tense in each sentence. If you say, "Went," that is the normal past tense. If you say, "Had gone," that is the past perfect tense.
How are those two tenses different? While the normal past tense says that the action happened at that time in the past, the past perfect tense says that the action happened before that time in the past. So in this case, if you say, "I had gone to school," that means you went to school before the principal arrived.
But what if we change your example? Are there times when both "went" and "had gone" basically mean the same thing?
Imagine if you are talking to somebody about a friend whom both of you know. The person you're talking to wants to know how you met that friend. Either of these would be fine:
a) I went to school with him.
b) I had gone to school with him.
In this example, we are making the same exact change between the two sentence, but they basically still mean the same thing. How?
Remember that the normal past tense means something happened at that time in the past, while the other one means it happened before that time. These two sentences don't say when that time actually was. You can only find that out from the context.
In this example, you are telling someone how you met a friend that you both have, so in this case, the time is basically any time before the present moment. You are talking about something that happened sometime before the present, but you aren't being specific about when.
So if you say, "I went to school with him," that's correct, because you went to school with him at some point in the past. But if you say, "I had gone to school with him," that's correct too, because no matter how recently you went to school, time would still have passed in between that and the current moment. So in that case, you went to school with him at some point in the past, and you also went to school with him before a more recent point in the past.