(N/A) The polarity of a molecule is determined by the vector sum of the dipole moments of its individual bonds.
$CO_2$ is a linear molecule $(O=C=O)$. The two $C=O$ bonds have equal dipole moments but act in exactly opposite directions. As a result,they cancel each other out,leading to a net dipole moment of $\mu = 0 \ D$. Thus,$CO_2$ is nonpolar.
$H_2O$ has a bent (angular) geometry due to the presence of two lone pairs on the oxygen atom. In $H_2O$,the $O-H$ bonds are polar because oxygen is more electronegative than hydrogen. Due to the bent shape (bond angle $104.5^{\circ}$),the bond dipoles do not cancel each other out. Instead,they add up to a resultant dipole moment of $\mu = 1.85 \ D$. Therefore,$H_2O$ is a polar molecule.