The "M" of XLSM stands for macro. Macros are programs embedded in Office documents used to automate different tasks. Staring from Excel 2007, XLSX spreadsheets that contain macros are saved with the XLSM extension.
CSV is a file extension that can store comma separated numeric and alpha numeric data in simple text format. CSV is used while data transferring and it can contain records contained with a lot of fields. Each record has same number of fields.