The sugar, called deoxyribose, forms the backbone of the DNA molecule, while the nitrogen bases from opposite strands form hydrogen bonds that help hold the structure together.