Normally, you can associate a verb's prefix with English verb's preposition.
eхать - simply to go
приехать - to arrive (as if to go in)
уехать - to depart (as if to go out)
etc.
куда ты ехал? - where were you going?
куда ты поехал? - where are/were you going?
откуда ты приехал сюда. - where did you come here from?
куда ты уехал? - where have you gone? (perfect form)
куда ты ездил? - where have you been going?
куда ты шёл? - where were you walking? where did you walk to?
куда ты пошёл? - where are/were you going?
куда ты ушёл? - where have you gone? (actually walked, in Russian to walk and to go by smth can be different verbs, here шёл relates to walking)
куда ты ходишь каждый год? - Where do you walk every year? (a bit weird question), if you meant to ask 'Where do you go every year' you should ask Куда ты ездишь каждый год.
Also, keep in mind, than the English verb 'to go' can be translated into two different verbs:
* to walk (ходить, идти) - only if you speak about a person.
* to go by something (a car, a horse, a plane, a train, etc.) (ездить, ехать)