The given reaction is an application of Darzen's reaction in which an aliphatic alcohol (preferably 1∘ or 2∘ ) gets converted into the respective alkyl chloride (in pure form) through SN2 pathway when it uses
Note Phenolic - OH group does not respond to this reaction as +R effect of phenolic −OH group gives double bond character to the C−O bond.