You'll also find people - sometimes authors who haven't experienced this, most often non-writers who have no idea what it's like - asking questions like "you invented the character, the setting, and the plot, can't you control what happens?"
If you've ever experienced this, you'll know that the answer is "no, not if you want the story to work!"
I had this happen to me in a big way a few years ago, in the middle of November no less. I had chosen the main character to write a particular article that was important to the plot (she worked on a student newspaper). She quite happily did all the research for it, but when it came time to actually write the article, she balked. I prodded her. The other characters prodded her. I complained to my husband about her. She flat out refused to write the damn article!
Sound familiar?
Now I don't know exactly what's happening down in the shadowy recesses of the brain. Creativity is an odd thing. I don't know what's happening, but I do have a theory, one that my husband and I came up with in one of our discussions on writing.
When you're writing about a character, even one that you've done up a complete character sheet for, you may still find that you put random throwaway details into your writing, some of which you promptly forget about. When you're not writing at all, you may still think about the story and the character, and what he or she (or it) is like. These are details that don't show up in the character sheet, character notes, or whatever method of storing information about a character you may use. Those details, however, stick in your subconscious.
That's the key to the theory. There's all the information about the character that you know consciously. All the stuff you've recorded, what you think of first when you think of the character. Broad personality traits, overall skills, bits of history, knowledge, and personality relevant to the plot, and so on. I believe that your subconscious takes that information plus all of the "forgotten" details, and synthesizes a more complete character. When you're in the flow of writing, you draw on that without realizing it. That is what informs a slightly unexpected reaction on the character's part, their choices in minor issues - and their incredible stubbornness you encounter when trying to make them do something that their character simply wouldn't do. And because the critical details are coming from your subconscious, you don't know why the character is behaving this way. You feel like you're no longer in control of the character or the story, and like the character has an independent existence.
But the story must move forward. You don't want to completely change the plot you've spent who knows how many words building up to. Chances are good that this is a key plot point - if it weren't, you probably wouldn't be fighting quite so hard to get your character to do it!
If your character is flat out refusing to do what you want, you can try a few things. One is to force him into it; put him in a situation where he can't not do what you want. I find that this is often less than satisfying. Another option is to trick him into it; set up the situation so that he does what you want and only realizes afterward what he's done. I find that this only occasionally works, and usually only on a plot point that's fairly subtle at the time. Another option is to take a hard look at your plot and ask yourself if it's really necessary that this plot point happen at this time. It's possible that the character is willing (for varying definitions of willing) to do what you want either earlier or later in his character arc. Still another is to ask if it has to be that character. There may be another character who could do it just as well, or better - and by that I don't mean doing a better or more skilled job at it within the story, but that it works with the plot better, or in more interesting ways.
In my case, my husband provided the solution to the problem I described above - he asked why it had to be her in particular. It turned out that it didn't, and she handed over her research with a sigh of relief to one of the characters who had been prodding her to write. This actually opened up a few interesting avenues later on, so in the end it was a good thing that she was so stubborn.
I have to say I like it when my characters come alive like that. It can take some effort to make sure the overall plot stays on track, something I usually refer to as "throwing rocks at the characters to herd them in more or less the right direction", but it's been my experience that the resulting story is stronger for it. I do still have to work in things I know the plot needs; I can't completely let the characters run the show. I just let them think they do, and throw rocks at them from a distance to block the path they want to take while leaving open the path that I want them to take. How they take the path I've chosen for them I leave to them to decide.