Standard types of DMMs convert the AC to DC using a simple full-wave rectifier circuit. This type of circuit generates a DC voltage that's proportional to the average value of a waveform. The meter displays the RMS value of a sinewave by multipliying this by the difference between the average value and RMS value of a sinewave (roughly .707/.637). Thus this meter will display the correct RMS value only of a sinewave. Other waveforms will be in error since they have a different ratio between their average and RMS value.
If a DMM is a true RMS meter it has more complex circuitry that performs the actual RMS calculation of the waveform and thus will accurately display the RMS value of any type of waveform including square and sine.