M-codes are the miscellaneous (machine) commands in a CNC program that control functions other than motion — spindle on/off and direction (M03/M04/M05), coolant (M08/M09), tool change (M06), and program stop/end (M00/M30). They work alongside G-codes to run the machine.
Exact M-code meanings vary by control and machine, which is one reason a post processor is tuned per machine.
Get a real number from a Machine Blue Book specialist — free, no obligation.