We need more info to help you fully like

  1. What is your OS i.e windows 98 ect.

  2. what version of avast! have you got

  3. what is the trojans/virus full name

  4. where is it (full path)

All i can say is that the reason you can’t just deleat it is because the computer is using it and you can’t deleat something in use by your computer. Most trojans do this.
And you will have to stop it from being used before you an deleat it.

–lee