Enols are very reactive alkenes that behave like nucleophiles. The α carbon is very nucleophilic. The -OH group is a resonance donator making the α carbon high in electron density. This is easily visualized by examining the resonance structures of the enol form. Notice the negative charge on the α carbon in the second resonance structure.
Treating an aldehyde or ketone with a diatomic halogen (X2) under acidic conditions results in α halogenation.
Under these conditions, the aldehyde or ketone tautomerizes first to the more reactive enol. This is the slow rate-determining step or bottleneck for this process. The enol acting like a nucleophile attacks the polarized X2, to form a resonance stabilized cation.
This is a two step process.
In general carboxylic acids do not readily form enols, so the acid is brominated with PBr3.
In the first step, the carboxylic acid is brominated to form an acid bromide. The acid bromide tautomerizes to the enol form which is subsequently brominated. In the second step, the the acid bromide is hydrolyzed back to the carboxylic acid.