Alcohols are soluble in water due to formation of intermolecular H-bond with water and break H-bonds already existing between water molecules. Therefore they are soluble in water. On the other hand hydrocarbons cannot form H-bond with water molecule and hence are insoluble in water.