The main difference between the DS3231SN and DS3231M is that the 'M' part is driven by an integrated, temperature compensated MEMs resonator, whereas the DS3231SN is driven by a temperature compensated 32kHz crystal oscillator. The accuracy of the DS3231M is +/- 5ppm from -45 to +85degC, the accuracy of the DS3231SN is +/- 3.5ppm from -40 to +85degC.
Both parts come in the same package and pinout.