While studying Russian last year, I remember learning the word почему means "why" and then later learning the word зачем and that it also means "why". In the absence of a clear definition at the time, I just made the assumption that it's a stylistic thing and started swapping them in use to try to develop a "feel" for it.
Over time, I had started to pick up on some usage patterns. I've noticed that "зачем тебе" is often the response to questions that a person finds too personal, and "почему" is usually the response when someone is denied something they want... but operating on these assumptions, and with little additional understanding, I've also managed to occasionally offend people by using the wrong one!
Recently, though, one of my Russian friends pointed out to me that I had used зачем incorrectly, and that these two words are most definitely not interchangeable. (I can't stress how nice it is to have good friends who care about helping you to learn correctly, rather than accepting your mistakes.)
When I pressed her for an explanation, she couldn't give me one on her own, but she did find me this excellent blog post (in Russian) explaining when to choose зачем and почему.
UPDATE: The best and most comprehensive online Russian course I've found is Rocket Russian (I've had great success using it). If you're learning Russian and want to get your head around things like zachem and pochemu, then I recommend it.
We just say "why"
In English, we just use the word "why" for all questions of causation:
- Why is he here?
- Why did you say that?
- Why are these books in front of the door?
But it turns out that in Russian, you must choose your question more carefully, based on the kind of answer you are expecting.
The word почему literally means by what means, and (as the author of the blog I mentioned describes it) it is more concerned with the past. You ask почему when you want to know why something happened, how it got this way, etc.
The word зачем literally means for what, and it is more concerned with the future. You ask зачем when you are concerned with expected results, etc.
So with the example question why are these books in front of the door?, you can ask two very different questions based on which question word you choose:
Почему лежат эти книги перед дверью?
Зачем лежат эти книги перед дверью?
Naturally, the question word you choose will determine the answer you receive:
Почему вы здесь?
Ваш магазин – единственный открытый.
Зачем вы здесь?
I love this excellent example from the previously-mentioned blog:
Зачем камень катится с горы? Для того, чтобы спуститься с горы!
If the person asking had correctly used почему, the answer would have been "gravity". But because the queestioner incorrectly chose the word зачем, the correct answer is one of intent.
This also makes it a little more clear how someone could be offended why you choose the wrong word. Почему спрашиваешь? casually asks why do you ask?, whereas зачем спрашиваешь? more combatively asks what are you after with that question?