how is dna protected inside a cell ?

how is nucleic acid protected in a prokaryotic and eucaryotic cell?

links would be appreciated