Phosphate groups form the "backbone" of both DNA and RNA molecules, alternating with the sugar molecules.