Although they both have the same C2H6O chemical formula, dimethyl ether, CH3OCH3, boils at -25C while ethanol, CH3CH2OH boils at 76C. Why?
An alcohol is an organic molecule containing an -O-H group.
Any molecule which has a hydrogen atom attached directly to an oxygen or a nitrogen is capable of hydrogen bonding. Such molecules will always have higher boiling points than similarly sized molecules which don't have an -O-H or an -N-H group. The hydrogen bonding makes the molecules "stickier", and more heat is necessary ...
The boiling points of ethanol and methoxymethane show the dramatic effect that the hydrogen bonding has on the stickiness of the ethanol molecules.