To add a bit more detail to the initial post (which I would call a thermodynamic answer):
You are basically asking about how the genetic system and our
biology originated.
This is currently not fully resolved. However, there are several hints and hypotheses about the issue.
These approaches amount to:
1) figuring out a simpler system from which the current system could be derived, and
2) figuring out how those simpler systems could have evolved in the first place.
An important associated question concerns compartmentalization: At what point did a lipid membrane
isolate small parts of the overall local chemical mix?
This would be the beginning of cells, leading to:
1) the beginning of competition among assemblies greater than molecules, and
2) the beginning of the ability of the genetics system to control its local molecular environment, which becomes its cellular environment when its contained in a membrane,
3) the ability to achieve much higher concentrations of reactants than would be found in an open external environment, thus getting chemistry to better go the way you want (and to keep more of the product).
One might say it quantized life, as opposed to not having membranes and having a big pool of biochemistry going on with a bunch of different genetic information mixed together in rather random proportions.
One might also say: the effective limits of molecular control are pretty small, so small units might as well be walled off for better control. Longer range communications would have to be between the cellular units.
The dominant hypothesis for the earlier stages of this is now probably the
RNA world idea where there is not DNA or proteins yet, just RNA.
Besides being a polymer molecule which can (like DNA) encode information in its sequence (sequence of different monomers), be sitting around, it also is storing information (the current function of DNA), RNA can take sequence specific physical conformations (current examples: tRNA, ribosomal RNA), which can at times have enzyme-like activity (a major current function of proteins), do
self-replication (to some extent). A critical thing to achieve, on the way to life, is generating self-replicating information-containing molecules. They would also have to replicate the “genes” for the other ribozymes providing other molecular services of various kinds in order for the local metabolism to function enough for a self-replicating RNA to function. This would be its permissive local molecular (or cellular) environment. Without that its adaptations would be useless.
Next step might be the assembly of peptides and proteins based in some way on the RNA sequence. Eventually the process would be assisted by (if not originally established with) tRNA–like structures (able to pair bond with the RNA sequence) to match amino acids to the RNA in a sequence specific manner. In either case, the amino acids strung along the RNA sequence would polymerize in some way to make peptides and proteins.
A mature biological system would also need a ribosome to more efficiently assemble proteins from the tRNA-amino acids. Much of the ribosome is RNA which have some enzymatic properties.
At this point, there might be a DNA-like storage RNA, mRNA like sequence conveying information for protein synthesis, RNA enzymes, tRNAs, and a ribosome-like protein assembly.
RNA can store information, but DNA is a more stable and better storage medium. Eventually DNA becomes the long-term information storage medium and mRNA’s become an intermediate message used in the construction of certain protein sequences.
At some point, membranes enclosed a cellular space containing the replicating molecules and their required support systems.
This is important because:
- the cell can then develop mechanisms to control its internal environment.
- Ion levels are controlled (or death will happen in most environments)
- Special contents (energy rich molecules or informationally unique molecules it took a while to evolve) will not just float away. Cell interiors are dense with these special items which can give them a competitive advantage over other units. This allows more efficient competition and therefore probably faster evolution.
The genetics/transcription/translation system can not just start itself from nothing. It needs a cellular (or local small scale) environment in which the components of the system (or a slightly more primitive but still compatible set on components) provide a permissive environment for the genetic information to be adaptively expressed. Since the components of the cellular environment can eventually be replaced by new productions from the genetic system, the genetic system also controls the cellular environment (but with a time lag). It can not however boot start it up from nothing. This is a big issue in the beginning of living systems (on earth). It had to be a gradually assembled system in some way.