Imagine a primordial soup, an ocean of chemicals without any bacteria to break them down. Energy inputs catalyze simple organic reactions that combine simple molecules into more complex molecules, and still, no reason for them to break apart again. This goes on for a few hundred million years, until one of those reactions is productive and forms the first molecule that can be called alive, a self-replicating RNA.
But I don't think that's how it happened. I may be going out on a limb here, but I don't think a self-replicating RNA just appeared by chance. I think it evolved.* That's to say, I think a series of lightning bolts didn't directly result in a self-replicating RNA. More likely, the spontaneous reactions fueled by terrestrial and cosmic energy probably resulted in some volatile chemicals that initiated RNA synthesis.
It's a fine line, but it solves the chicken and the egg problem of the self-replicating RNA. Probably there were nucleotides that spontaneously bonded together to form a short, simple RNA polymer. This probably happened plenty of times over those hundred million years, in plenty of places. It's conceivable that a few of those simple RNAs spontaneously folded into a structure that made it more stable, or made it chemically attractive to another folded RNA. If they're already stuck together, it's awfully easy for an energy source to bind them together.
If it happened once, it probably happened more than once. And at least once, it probably formed a molecule with an active site. All a molecule needs is a pocket where two things come together and conditions are favorable for a reaction. Maybe this molecule simply took two nucleotides, made them comfortable, and bound them together. If it could bind not just single nucleotides, but also strings of nucleotides, it can spark a revolution.
Once that molecule was on the scene, RNA oligomers were probably all over the place, and it would be easy to come up with all sorts of different shapes and sizes. This thing couldn't be considered alive, since the instructions for making it are "mix some chemicals together, add some energy, and wait a hundred million years," not exactly encoded within the molecule. But it had the potential to synthesize life. If it's stable enough, has a good enough supply of substrates, and a long enough time, it could synthesize a random assortment of complex RNAs, including one that folds up into a simple polymerase.
I may be writing this prematurely. I started reading The Selfish Gene (Richard Dawkins' self-referencing attempt at popular science that proposes that the gene is the basic unit of evolution) this weekend. While the central thesis of the book is questionable and his writing style is starting to offend me, the chapter on the origin of life was thought-provoking. I probably should instead be reading Life from an RNA World, which, judging from the reviews and table of contents, is a better fit for my curiosities. However, since the only library copy is at Yale and checked out, I'm not ready to commit the $22 to buying it, and my free time is limited to one personal reading book at a time, I'll wait and see.