When will acid-base reactions occur before substitution reaction
Acid-base reactions (like the one shown, involving proton transfer between electonegative atoms) are almost always extremely fast - for all practical purposes instantaneous (diffusion-controlled), and therefore much faster than substitution reactions. In the example given, the bromocyclohexanol is of comparable acidity to tert-butanol (maybe even more acidic), so we would expect instant proton transfer, and the observed result.

The initial proton transfer might not be so favorable if you used a much weaker base, so you could get a different result - or no reaction.