Writing is not magic. It's a craft, a process, a set of steps. As with any process, things sometimes break down. Even in a good story, the writer runs into problems. So the act of writing always includes problem solving.
Help! For Writers: 210 Solutions to the Problems Every Writer Faces (ed. Little, Brown, 2011) - ISBN: 9780316192750