They are backup files, generated when you edit your source file. Every time you save a file, the original file before the edit were made is renamed .BAK so if you made a mistake you can 'undo' your errors and start again.
Just rename the *.bak files to *.c (or whatever the original file name is). *.bak files are identical duplicates of the original. You will most likely have to exit your compiler's IDE before doing this.