Nucleotides are the building units of both DNA and RNA, composed of a nitrogenous base, a sugar and a phosphate.