ELF and a.out are two different ways of arraning data in a compiled program or library.
a.out is older; ELF has more features. Most of the linux world switched to ELF several years ago, and new a.out binaries are uncommon on linux. (Although, for historical reasons, the compiler will still CALL your compiled file a.out). The kernel runs ELF binaries natively, and runs a.out binaries if you have support compiled in for them (or in a module - called binfmt_aout or something like that). Use the 'file' command to see what sort of file an executable is. Carl