Thionyl chloride, SOCl2, converts a hydroxyl group to a chloride group, which almost always acts as a leaving group in the next step. Pyridine is often added as a solvent with PBr3, PCl3, and SOCl2 when we wish to halogenate an alcohol because it is poorly nucleophilic but sufficiently basic to deprotonate an intermediate in the reaction and therefore prevent it from reverting to reactants (i.e., pyridine increases yields).
In the first step, a chloride group replaces the hydroxyl group in trans-4-tert-butylphenol. In the second step, the bromine ion in lithium bromide attacks and substitutes the chloride group, thereby generating 1-bromo-4-tert-butylbenzene.