Sometimes when I run my code, a core dump file is generated when I terminate the program by Ctrl+\\. The file name is of the form core.*
.
It's a tool to aid in debugging an application that's behaving badly. It's large because it contains the contents of all the applications physical memory at the time it died as well as the register states and stacks of all its threads.
They get generated when the kernel kills an application for doing something evil, like generating a segmentation violation or a bus error.