What exactly do film directors do, and what are they responsible for?

I was reading this thread about crappy directors and got to wondering how much of these things are actually the director’s fault, how much is the writers’ fault, and how much is the cinematographer’s fault?

I’m not a film person at all, so I don’t really know what a director does, and how much of the actual film is the director’s work and how much is the writer, cinematographer and actors’ work. Also, how do second directors and things like that figure in?