In the DNA, two polynucleotide chains are present which have opposite polarity. One chain has 5' → 3' polarity while another chain has 3' → 5' polarity.
In one polynucleotide chain, at one end 5' phosphate group is free for making phosphodiester bond and on the other end 3' OH group is free, so polarity is decided based on the position of a free -OH and phosphate group. For the detailed structure of the DNA, refer to the diagram shown below.
Two polynucleotide chains are held together by hydrogen bonds.