Hydrocarbons in which one or more hydrogen atoms are replaced by hydroxy group (-OH) are named as alcohols and phenols.
In other words, the hydroxy derivatives of hydrocarbons are named as alcohols and phenols. Out of alcohols and phenols, alcohols are hydroxy derivatives of aliphatic hydrocarbons, whereas phenols are hydroxy derivatives of aromatic hydrocarbons.