Spontaneous generation and abiogenesis are a pair of theories involving the emergence of life from non-living material. The difference is that spontaneous generation is an obsolete theory of how certain forms of life commonly emerge from non-living matter, whereas abiogenesis is the ongoing study of how the first life on Earth emerged through a chain of increasingly complex organic chemical reactions, but did so only once (or a few times) before giving rise to hundreds of millions of years of subsequent, increasingly complicated life forms.
The theory of spontaneous generation began with ancient Greek philosophers such as Aristotle. The ancient Mediterranean world shared with modern evolutionary biologists the assumption that, in chronological terms, the existence of the physical, non-living world must have preceded the emergence of life. (The same assumption is even shared by ancient religious texts such as the Bible, although of course in that case the spark which caused the transition from non-life to life is an act of God.) What precisely had caused life to arise, the philosophers were not sure - but they agreed that something clearly had. Moreover (and this is a clear difference between spontaneous generation and abiogenesis), Aristotle observed that some forms of life seemingly continued to arise from non-living material on a daily basis. He theorized they did so by forming out of an energy or heat present in all matter, known as pneuma.
The Aristotelian theory was essentially accepted without change throughout much of the Roman and Christian ages of Europe. It was only at the dawn of the Enlightenment era that scientists began to challenge this theory. One of the most famous and decisive series of experiments was conducted by Italian doctor Francesco Redi. One of the best examples the Aristotelian school was able to point to for the existence of pneuma was the appearance of maggots in rotting meat, allegedly through spontaneous generation (though we now know through eggs laid by mature insects). Redi allowed meat to rot in a set of containers, some of them open to the air and others sealed. No maggots grew on the sealed meat. A number of other studies followed but spontaneous generation was ultimately abandoned by the 19th century.
Abiogenesis, in contrast, arose in response to a superficially similar question. The theory of evolution provided an explanation for how one form of life could lead to another, different form. Writ large, this process could even be used as a sort of family tree of life, tracing all living forms of today back to simpler, more basic forms of life which existed hundreds of millions of years ago, some of which remain in the form of fossils today. Eventually, however, this process of tracing back ran up against the same problem which the Greek philosophers faced two thousand years ago. If neither the chicken nor the egg came first - then what did?
Critics of the theory of evolution often argue that evolution cannot explain how life arose in the first place - and they are correct, insofar as evolution only attempts to explain what could have happened to life once it already existed. For a natural explanation of how life arose in the first place, however, scientists have turned to a second body of theory known as abiogenesis. Unlike spontaneous generation, which early philosophers believed happened over and over again (for instance, maggots constantly being created from rotting meat), abiogenesis only has to have happened at least once.
There are quite a number of theories about how this could have happened, however. The situation is complicated by the fact that scientists have still not fully settled on an understanding of the climate and surface makeup of the Earth at very distant points in its history. During the 20th century, the most common explanations, like that which provided the foundations for the famous Miller-Urey experiments of the 1950s, was that the early Earth was covered by a sea rich in organic compounds, a "primordial soup," in which organic compounds forming through entirely natural processes took on increasingly lengthy and complex forms until, on at least one occasion, these complex compounds became capable of storing information and splitting apart into new compounds containing all the fundamental characteristics of their predecessors. What these first self-replicating molecules were, and how they came to be, is still the subject of numerous inquiries which can only be characterized as, at best, experimentally-informed speculation.