The sugars found in nucleic acids are pentose sugars; a pentose sugar has five carbon atoms.
A combination of a base and a sugar is called a nucleoside.
Ribose, found in RNA, is a "normal" sugar, with one oxygen atom attached to each carbon atom.
Deoxyribose, found in DNA, is a modified sugar, lacking one oxygen atom (hence the name "deoxy"). This difference of one oxygen atom is important for the enzymes that recognize DNA and RNA, because it allows these two molecules to be easily distinguished inside organisms.