Unix uses 0xA for a newline character. Windows uses a combination of two characters: 0xD 0xA. 0xD is the carriage return character.
^M happens to be the way vim displays 0xD (0x0D = 13, M is the 13th letter in the English alphabet).
^M is entered by holding down Ctrl and typing v followed by m, and then releasing Ctrl.