One may understand the reactions between molecules as a function of their electron distribution.
The electron density is to the molecules as the atmospheric pressure is to the earth.
The latter can be understood by low (storm) and high (anticyclone) pressure zones.
Electronegative atoms concentrate electron density and leave their surroundings with a lack of it.
The hydroxide anion (HO-) comes from the water by its loss of a proton and it bears a high electron density.
It thus acts as the nucleophile (red).
It reacts with the methyl chloride attacking the molecule by the methyl side that, because of the highly electronegative Cl atom, bears an important lack of electron density.
The C atom therefore acts as the electrophile (blue).
Consequently, the C-Cl bond breaks and the C-O bond forms.
It happens that the C-O bond is stronger than the C-Cl and the energy balance is favorable.