A witchfire sometimes spawns upon the death of a hag, when one of
these savage crones dies with some terrible plot unfinished or simply
proves too maliciously tenacious to succumb to death’s grasp. (Source)
You say "TPK"; I say you have just been handed the perfect opportunity to invent a terrible unfinished plot
that just so happens to require the PC's being alive and held as captives.
If it helps, cackle evilly and break out the A-Team quotes when you take down the last PC. The players don't need to know you made this all up since the previous session.
How To Learn To GM
There are a variety of resources nowadays that can help you accomplish this. There are also many existing questions on this site about GMing that will point you to more content than you can ever consume.
Watch
In your question, you mention wanting to see more examples of real play. There's a number of ways to do so.
Actual Play Resources
- Podcasts capture the entire play session. There's video podcasts too like on Twitch. See Where can I find actual play podcasts for RPGs?
- Session Summaries (aka Actual Plays, Story Hours, Campaign Journals) usually are severely abridged, but leave out a lot of the cruft. See Where can I find transcripts of actual game sessions? and Where to find game session reports?
- Blogs. There's a million blogs about how to GM. Start with the RPG Bloggers Network. Go to the blogrolls of blogs you like to find more like them. Focus in on blogs about your chosen game(s) and play style(s).
- Play by post forums. If you want to watch people actually play in text, there's a million of these too. Many dedicated sites, specific forums on RPG.net, ENWorld, Paizo, etc. In fact, RP-by-post is very popular even when not affiliated with a proper RPG/ruleset.
- Sit in. There are plenty of other people running games, some in public places like your friendly local game store (D&D Encounters, Pathfinder Society) and conventions. See below under "Play" though, if you're going to the effort of being there you need to stop being a wallflower and get on in and play.
Some games also have better advice sections than others - see What role-playing games have good gamemaster advice sections?
Play
In the end though just watching is not the most effective approach to learning. Watching games is less useful experience than actually being in one. Have you considered playing in those games before running them to learn from other GMs? It's reasonably easy to find other gaming groups, you don't have to abandon yours to play in another. Where can I find other RPG players?
Go to RPG conventions, find games at gaming stores, play on forums or G+ (see also Finding online RPG players for a play-by-chat RPG Campaign?) - just get more experience. The GM was often called the "judge" in the old days, and in the legal world you need to spend a lot of time being a lawyer before you make a good judge. You need to spend some time playing to become a good GM. If you can't think how the players will proceed in a given situation, you need more play time.
Read
There are many books on GMing - see What is the single most influential book every GM should read?
Also try watching/reading relevant genre media. "I don't get how to put together a story" should get its first-order correction by consuming some of that genre and looking at the stories.
Learn
A lot of the problem you seem to be experiencing is pure storytelling. Try How do I get better at narrating/storytelling as a GM? and As a GM, how can I create and role-play diverse NPCs better? Read up on the specific aspects of GMing you feel you're not good at, there's plenty here. Try questions tagged with the gm-techniques tag. Feel free and ask questions here as well about specific aspects of GMing.
There are also a large, large number of RPG forums out there in the world, for every game and type of gaming. If you don't understand something someone posts, you can easily reply and ask.
Do
aka How I Learned To GM
We didn't have these newfangled Interwebs when I was a kid. I GMed almost before I ever played. I did play in a very informal game of D&D in a car on the way to Scout camp, no dice, PvP, everyone had artifact weapons. But other than that, I started out as a GM. I bought a sci-fi RPG (Star Frontiers) without knowing anything about it (I had bought and played a little TSR chit game, Star Force, and was looking for other fun stuff from the same company). None of my friends were interested in GMing and I was in a small Texas town that didn't have conventions or whatnot - life was less mobile and connected back then. So I just read the game books and then ran games for my friends. And I kept running them, and learned from my mistakes and corrected. I read comics and science fiction avidly, so characters and plots weren't that hard to devise. Beyond that, I just learned the way you learn to do anything through practice, whether it's a sport, writing, a musical instrument... How-to's and YouTube videos are cute jumpstarters nowadays, but "Do, and learn from doing" has yet to be eclipsed in being the primary way to actually become good at something.
Fear of "making a mistake" is the dumbest and most paralyzing instinct you can have in life. In a video game you're going to die a couple times off the bat; in baseball you're going to swing and miss a lot before you hit; in baking you're gonna burn some cookies. But you learn through those mistakes. It's fine to do a little reading up ahead of time but the only way to become good, really, is get your butt in gear and do it.
Best Answer
You have the right answer in your choices.
Being a DM isn't about writing a script and continually nullifying player choices to keep them "on script". If you want to write a story without much outside input, then write fiction. Nothing wrong with that.
A DM is only one participant of the story when role-playing. Sure, typically the DM will set up the initial scenario and make certain decisions that will constrain choice. But you have to accept that once you turn the PC's loose on "your" world, they are likely to take your carefully crafted story, and fold/spindle/mutilate it (or all three!).
You can of course plan an overarching story for the campaign. It can a great idea to do so, it provides direction and focuses the campaign. But if the players make the story no longer possible and you can't come up with a satisfying way to "fix" it, then it's time to adjust.
If the party goes off of the rails, it is likely due to one of three things
The last two are sides of the same coin. Both involve letting players "run the show" to a certain extent. One problem that I've seen multiple times is for the GM to plan one scenario after another after another, never giving the players a chance to catch their breath. Instead of plotting things so extensively, ease up occasionally. Let the players know that after the current big boss is killed that there are no immediate plans for the campaign and ask, "What will you want to do?" This can serve as a release valve and free up any building tensions.