In order to explain the differences, I have to caricaturize both to the extreme -- to contrast them. Realize that most people are a combination of both attributes -- but you can at least get some ideas on what to look for, if you know the extremes.
There are needs for both (engineers and programmers) - and different tasks require more of one or the other. Most tasks require only a few engineers and quite a few programmers. The problem is that many managers don't understand the difference, or hire the wrong ones for a job.
Programming is not hard - it is tedious. You need to be able to break complex things down, into a long series of simple steps. That is it. How you approach that problem will define whether you are a programmer or an engineer. So the biggest difference between the two is philosophical -- and like most philosophical differences, it can lead to tension. Arrogant types (on either side) can get into these little ego-driven superiority complexes that drive the other side nuts, and some pretend that the "others" are idiots. They aren't idiots -- they just have different goals, different motivations, and different philosophies.
Engineers are more experienced (mature (1)) than programmers (especially in software and design theory ), but that doesn't mean that they are who you need for a task (or that they are always better). Engineers are the "designers", the ones that have been around for years and understand lots of different concepts, or understand some specialties really well. Most of an engineers knowledge is NOT applicable to the task at hand directly, but they draw on their experience and education to solve major projects -- all while avoiding pitfalls. (In complex systems there are many pitfalls, and some can cost projects "years" and millions of dollars).
(1) Don't confuse age with maturity -- many people never grow up. Just because a guy is a 50 year old coder / programmer, doesn't mean he grew past the "hacker" phase - and there are quite a few 20 year old engineers. So look at their personality and philosophy, as well as their experience and education, to figure out which they are likely to be.
Programmers are more the down and dirty types. They used to be called "hackers", but that now has a new meaning (2). Now days they are more likely to refer to themselves as Coders or Code-Jockeys. Programmers don't have to know everything first, they just enjoy the thrill of solving the problems as they come. They are more the eccentric artists of the computer world. They often spend days without sleep and living on junk food and Mountain Dew, just "doing" -- Go, Go, Go! Of course, they often spend those weeks solving problems that have been solved before (if they had just read a book and researched the issues before hand) -- but sometimes (occasionally) they solve problems in whole new (and ingenuous) ways (and better than the canned solutions), or they solve problems that have never been solved before. They are the impetuous youths of the world -- that used energy and vigor to try compensate for a lack of experience and design (and they succeed). They don't know what they can't do, so they sometimes do the impossible.
(2) Hacking used to mean (in the 70's and early 80's) programmers who would dive into a problem (without documentation or a full understanding of the problem, etc.) and just program their way out. Not much thought went design (because they could think and implement faster than they could design). They didn't need "no stinking manuals", they didn't do documentation (the code was self-explanatory), they just solved problems their own way. However, that name took on a different connotation when many people with this "hacking" personality, started using that persistence to break security, or to figure out how to violate the phone company in 16 different ways. (This brute force thinking is great for breaking security). Now "hackers" refers to that small sub-set of hackers that are often doing criminal acts, like hacking into places (instead of hacking code).