A strand of DNA (seen through an electron microscope)
If the RNA theory of the origin of life is right, then after a short time, about four billion years ago, the oceans on Earth had a lot of these strands of RNA molecules floating around in them, making proteins, and also making new strands of RNA. But RNA molecules were weak, and they were always breaking and making copies that were not really exactly right - not exactly the same as the original RNA molecule. This was partly helpful, because there got to be a lot of different kinds of RNA molecules, and therefore a lot of different kinds of proteins. But it was also partly bad, because if you had a good healthy RNA molecule it was hard to copy it exactly.
Here is a video that shows how DNA zips and unzips.
Some of these RNA molecules evolved to make two sides to their spiral staircases instead of just one. These formed a double helix: two spirals twisting inside each other. It was a much more complicated kind of molecule, but it was much stronger, just as a ladder is stronger with two sides than with only one. These new molecules are called deoxyribonucleic acid, or DNA for short. DNA stairs are made of two purines - adenine and guanine - and two pyramidines - thymine and cytosine.
This photo shows the edges of the double helix.
When a DNA molecule needed to make a copy of itself, it had nowhere for the new purines to fasten on to. So it had to unzip itself, just like the zipper on your jacket, and then it could make some new molecules and then zip itself back up again.