In the reaction of (R)-2-bromooctane with hydroxide, the formation of the major product, (S)-2-octanol, can be easily explained with the aid of the following scheme:
The nucleophile (HO-) attacked the carbon bearing the halogen (LEAVING GROUP) by the opposite side the latter is abandoning the molecule. This is the only way to explaining the configuration inversion that took place.
The reaction can be performed with other nuleophiles over different substrates with other LEAVNG GROUPS: