What CD or DVD? Is it a game? Also, I have to say that that will happen if the computer can't really handle a lot of things at once (due to the RAM). Try running a virus scan, although that's probably not the problem. The computer is loading the contents of the DVD or CD when you put it in. Try closing some unnecessary programs.
any cd/dvd. i have ESET smart security and their are no attacks on my system