Hi there all you genius guys!!

Well I was working on the how virus works and the cause of the spreading them. I found somehwere that a virus attaches to an exe like this: it rips up the exe in three parts the header, the body and the footer. Now in header it calls the code of the worm or virus whatever you call it and forward the executation to footer which is what is the virus exec. No once this code is executed, it throws the execution back the body which is main program, and then the original program runs.

First question: Is this true??
Second question: Is there any way to make sure that your executables are not vulnerable to any worm/virus to get into it??