"Pedir" and "Preguntar" Aren't So Tough to Tell Apart
The Confusion is Avoidable
The first meaning offered in most dictionary entries for the two verbs, pedir and preguntar, is to ask -- which is why so many people who are studying Spanish tend to have an aura of confusion surrounding their usage. It is somewhat ironic then that I should mention the error -- since the point of this article is to set the record straight, but it is likely that you are reading this because you have already encountered it and have some questions about them. So I thought I'd confront this first-level meaning head on and say that it should never have been promulgated by lexicographers -- except that dictionaries have to be thorough. At the first-level of meaning, they do mean to ask, but in very different senses of the word. Once again, English has one verb that is used in two senses and Spanish has a verb for each.
The best translation of preguntar -- for the purposes of avoiding confusion about its usage, is to use to question, in the sense of the act of formulating an interrogative. It can introduce a direct or an indirect quote, e.g., Juan me preguntó, "¿Quieres acompañarme?" or Juan me preguntó si yo quería acompañarlo. Note that in all tenses and moods, preguntar is a regular -AR verb, like hablar.
As for pedir, it does not mean, and is never used, to express the act of question forming. It is best translated as to request or to order (as in ordering food in a restaurant; Never in the sense of a military command, for which Spanish uses the regular -AR verb mandar). Unlike preguntar, pedir is irregular in the present tense, being one of the shoe verbs, which changes the e of the stem to an i. In the preterite, it has the same change, except that the e changes to i only in the third person, both singular and plural.