It is one ot those questions after which even natives get confused;)
Ехать is an infinitive and initially means to ride or to go. However, this word is rarely used in such form, we usually say "поехать".
For example, if you want to say YOU SHOULD GO HOME, you can't use the word without prefix -по:
- you should go home - тебе следует ПОехать домой.
One important thing, we use this word when we need to go somewhere only ones, I mean not freaquently, or right now.
Ездить - this word means "to travel" or "to go somewhere everyday, freaquently, every years and so on".
For example:
- we used to go to moscow every summer. - раньше, мы ЕЗДИЛИ (past simple of ездить) в Москву каждое лето.
Hope you understand my explanation ;)