Nucleic acids allow organisms to transfer genetic information from one generation to the next. When a cell divides, its DNA is copied and passed from one cell generation to the next generation.
DNA is organized into chromosomes and found within the nucleus of our cells. Its function in any cell is to carry the sequence of bases which will be transcribed into RNA. The function of RNA is much more difficult to explain. One well-known function is for messenger RNA to be translated into proteins, mainly enzymes. But there are other types of RNA, and these are called non-coding RNAs.