The Spanish Verbs Meaning "to Ask" are Many!
From Asking and Questioning to Pondering
The most fundamental of problems about deciding whether to use pedir or preguntar can be avoided in a way that works for many confusing verb pairs -- by not translating them as 'to ask'. Pedir is best translated as to request, to order (as in food) or to petition of something (like permission). Preguntar, on the other hand, is best translated as to ask a question or even simply to question (but not in the philosophical sense, as we'll see in a moment). One way to get beginners to understand this distinction is to get them to visualize (by acting it out) preguntar by raising your hand and saying "¡pregunta!" -- as in "I have a question!" Incidentally, this also helps model the healthy use of more Spanish in class.
Here are some finer points about pedir and preguntar that deal with the grammar needed to use them properly:
They almost inevitably require the use of indirect object pronouns -- someone has to be asked or a request is made of someone. That someone is the indirect object.
Juan le preguntó al professor sobre la tarea (John asked the professor about the assignment).
Yo les pedí permiso a mis padres (I asked my parents' permission).
Yo se lo pedí a mis padres (I asked it of my parents [e.g., permission]).
The use of the reflexive with preguntar -- preguntarse -- is one of the ways to express one of the various nuances of "I wonder."
Me pregunto si el correo está o no (I wonder if the mail is here or not).
Another synonym of preguntar is hacer una pregunta -- it is a bit more graphic in the sense that it articulates the act of forming a question.
Ese chico me hace preguntas todos los días (That boy asks me questions every day).
When used with por, preguntar means to inquire after or about someone, or to ask for someone:
Si alquien pregunta por mí, dile que no estoy (If anyone asks for me, tell him I'm not here).
For more advanced students, it is very important to remind them that the subjunctive must be used with pedir if it is used in the sense of one person requesting that someone else do something (subordinated noun clauses).
But there's more. Students need to expand their vocabularies -- and so finding more verbs of expression (communication) and sensing needs to be stressed. A few of these are interrogar, rogar, indagar.
The philosophical verb for questioning is cuestionar. Hamlet would have said Ser o no ser -- ésta es la cuestión. He would not have used la pregunta!