So earth is estimated to be around 4.5 billion years old, and life has existed for about 3.4-3.9 billion years of that, around >75% the time. For a little perspective, Homo sapiens have been around for up to ~250,000 years, just 0.00005% of the time earth has existed. In that time the earth has changed massively, early earth was pretty hostile, but that could have made it a good place to develop early life.
What was the pre-cursors to self-replicating DNA like?
Well one popular theory is the RNA world hypothesis, which suggests that precursors to life as we know it were RNA molecules that could self replicate (reproduce). These RNA molecules supposedly evolved in to life in the DNA/RNA/Protein world via an intermediate stage of ribonucleoproteins. The reason why RNA could have preceeded DNA based life is because it has the potential to carry information and to be the catalyst of its own synthesis.
"The unique potential of RNA molecules to act both as information carrier and as catalyst forms the basis of the RNA world hypothesis.
"RNA therefore has all the properties required of a molecule that could catalyze its own synthesis (Figure 6-92). Although self-replicating systems of RNA molecules have not been found in nature, scientists are hopeful that they can be constructed in the laboratory." in Molecular Biology of the Cell
However, the RNA world probably wasn't the first step on the road to self-replicating life, but other polymers with characteristics similar to RNA that could have acted as the template and catalyst required for RNA synthesis.
"Although RNA seems well suited to form the basis for a self-replicating set of biochemical catalysts, it is unlikely that RNA was the first kind of molecule to do so. From a purely chemical standpoint, it is difficult to imagine how long RNA molecules could be formed initially by purely nonenzymatic means. For one thing, the precursors of RNA, the ribonucleotides, are difficult to form nonenzymatically." in Molecular Biology of the Cell
"Shapiro doesn't think it's necessary to invoke multiple universes or life-laden comets crashing into ancient Earth. Instead, he thinks life started with molecules that were smaller and less complex than RNA, which performed simple chemical reactions that eventually led to a self-sustaining system involving the formation of more complex molecules." on LiveScience.com
This means that the first self-replicating RNA molecules were preceded by other molecules that were important in the progression from simple atoms, through non-biotic molecules, to large self replicating polymers which can be considered life. Copley et al suggest a progression in detail, with monomers being an early step in the progression (see figure 4 in the paper, and section 4 for extensive detail) where monomers precede multimers, which precede micro-RNA.
"Our model describes a continuous path for emergence of this sophisticated system
from a simpler reaction network fueled by geochemical processes. The processes involved in metabolism and replication were intertwined from the very beginning, a concept that neatly eliminates the chicken/egg problem. Further, this model suggests that many features of the RNA World, and indeed modern life, arose long before the RNA World and were retained as pre-biotic systems became more sophisticated." - Copley et al
An alternative and slightly different theory suggests that viruses were the precursors to modern life, a so called Virus world. Similarly it supposes that early replicators were RNA based, but that viruses evolved in to the earliest forms of self replicating DNA carriers.
"The Virus World Theory is closely related to the RNA World Theory, which says life first evolved as small pieces of RNA that slowly developed into complex DNA-carrying organisms. The Virus World Theory agrees that life's genetic material began as RNA. But it differs by arguing that the ancestors of viruses evolved before cells." from NationalGeographic.com.
Further good reading here, here, and here. I also recommend the book The Story of Life as an interesting related read.