SN1, SN2 or acid-base reaction
In both cases the alkoxide will be in an equilibrium with the alcohol. This will be occurring on a faster timescale than the substitution but in the first case it's irrelevant as  the same species are present on either side of the equilibrium.  



Methanol is more acidic than ethanol, however, so the reaction lies in favour of methoxide and ethanol.