Casting is such a vital and tricky part of making a movie that one wrong choice can bring the whole thing crashing down; if a role is cast perfectly its hard to imagine another actor in the part, and when its wrong it can be fatal. There are numerous examples of great actors giving bad turns (think the last decade or so of Robert De Niros career) but if the movie itself is terrible nobody is likely to notice.
It's only when the movie is otherwise great - bar one miscast actor - that accusations really start getting thrown about. And most frustratingly for casting directors, sometimes it doesnt matter how talented the actor is; if theyre wrong for the part there's very little they can do to compensate. Its rare to find one performance so poor it almost singlehandedly nullifies the movie around it, but they certainly do exist in a rare pile marked Cautionary Casting Fails.
The context can be any number of things - a hammy performance, someone out of their depth, a typecast actor desperately trying to break out - but all excuses are forgotten in the torrent of criticism. Its never pleasant when this happens, and its especially frustrating when the film is so close to perfection, only to be hamstrung by one lousy performance.