DNA has four nitrogen bases, one of them being thymine. For RNA, instead of having thymine, it has uracil. DNA is a double stranded (also known as double helix) and RNA is single stranded. This explains why RNA can leave the nucleus and DNA can’t.
RNA is single-stranded while DNA is double-stranded. RNA contains uracil while DNA contains thymine. RNA has the sugar ribose while DNA has the sugar deoxyribose.