The cellular chemical reactions and pathways involving nucleotide-sugars, any nucleotide-carbohydrate in which the distal phosphoric residue of a nucleoside 5'-diphosphate is in glycosidic linkage with a monosaccharide or monosaccharide derivative.