Parasitic viruses, also known as file viruses, spread by attaching themselves to programs.
When you start a program infected with a parasitic virus, the virus code is run. To hide itself, the virus then passes control back to the original program.
The operating system on your computer sees the virus as part of the program you were trying to run and gives it the same rights. These rights allow the virus to copy itself, install itself in memory or make changes on your computer.
Parasitic viruses appeared early in virus history and then became quite rare. However they are now becoming more common again with recent examples including Sality Virut and Vector.