The boiling point reflects the strength of forces between molecules. The more tightly bonded the molecules are, the more energy is required to convert them into gases. These forces are called intermolecular forces. There are 3 types, dispersion forces, dipole-dipole and hydrogen bonding. The influence of these attractive forces will depend on the functional groups present. For example heptane has boiling point of 98.4 degrees (1) and 1-hexanol has boiling point of 157 degrees. (2)
The fact that heptane has lower boiling point then 1-hexanol is because heptane belongs to alkane group and only has dispersion forces since it contains non polar molecules. Dipole-dipole forces exist between neutral polar molecules but heptane is non polar. Heptane does not contain hydrogen bonding as no H atoms bond with F, O, or N. On the other hand greatly increased boiling point of 1-hexanol is because 1-hexanol contains hydroxyl group where there is hydrogen bond occurring. It also has dipole-dipole force as the oxygen on the end makes a polar part of the molecule allowing interactions between them. There are also dispersion forces. The greater the polarity the higher the boiling point.
Surface area doesn’t play very important role when comparing the two above specific compounds because as the length of the chain is increased the surface area increases and thus boiling point increases but the surface area of above compounds is the same.
Thus compound falling in ‘alcohol’ functional group will have higher boiling point than alkane because hydroxyl group has hydrogen bonding which are stronger than dipole-dipole forces. The stronger the intermolecular forces the more energy it will be required to overcome these forces. Therefore more energy is required to convert 1-hexanol in to gas than it is required for heptane. So heptane experiences dispersive
References: 1) "Physical Constants of Organic Compounds," in CRC Handbook of Chemistry and Physics, 94th Edition (Internet Version 2014), W. M. Haynes, ed., CRC Press/Taylor and Francis, Boca Raton, FL 2) O’neil, Maryadele, J’et al (2006,2012). The Merck Index- An Encyclopedia of chemicals, drugs and Biological. [14th edition-version 14.9 ]