The negatively charged OH group attacks the backside of the Bromo-Methane (backside in the sense that it is the opposite side to which Bromine is bonded).
A transition state consisting of a central Carbon atom with five groups bonded to it, is created - it is important to denote this to be a transition state. The Bromine leaves the transition state to leave a Methanol molecule.
It is an Sn2 reaction