I'm really dreadful at promoting myself, and interviews are the worst of all. I have background in careers, so I know all the stuff about how to match your skills and experience to a job spec and person spec. I was once told that by the time you get to an interview, the panel already thinks you could do the job, it's just how things go on the day.
And sometimes, it doesn't matter how much you prepare, it's just how the chemistry pans out. I really think this is true.
Those first impressions are all important, and more important than we would like. A paper application doesn't get our personality over and sometimes it comes down to this. I was once on an interview panel where the person in charge of hiring didn't hire someone because they thought that person would be talk back too much.
If you want the basics of how to get your foot in the door of an interview panel, I think the Wikiman does this pretty well but after that, half of success is hitting the interview criteria - which I Wikiman also covers well, but the other half is what you could call gut instinct of the panel. Also, panels are not created equal. Sometimes there will be one member who has the final say, no matter if the others agree on a candidate. If the final say doesn't agree, that candidate won't get the job.
I'm not saying all this to give the impressions that theres no hope, but it does mean that sometimes it doesn't matter how well you prepare, or how well you suit the job, it just won't work out on the day, and it won't be your fault. Being turned down for a job can really shatter your confidence, so take heart that it's not always you- sometimes it's them. Learn from it, and move on.