Both C-O and O-H bonds are polar. In an O-H bond, as in water or ethanol, the positive charge is on the very small H atom. Consequently this is strongly attracted to the negative charge on the O atoms of adjacent molecules, so molecules containing O-H bonds are strongly attracted to each other and their boiling-points are relatively high - as in ethanol C2H5OH.
Dimethyl ether CH3OCH3 contains polar C-O bonds. But here the positive charge resides in the CH3 groups, which are much larger than an H atom. So the positive charge in the CH3 groups is less concentrated, and the mutual attraction of the molecules much less. So dimethyl ether boils much lower than the isomeric ethanol.
Look up HYDROGEN BONDS for further information.