Good tip from PC Magazine: “Recently, I began to receive spam messages that simply pop up on my computer screen. After a little research, I discovered that this spamming technique uses Windows’ built-in Messenger service, which sends messages in a broadcast across a network. The way to block these annoying messages is to disable the Messenger service. In Windows XP, you can do this through the Control Panel. Navigate to Administrative Tools | Services. Double-click on Messenger and click on Stop. Then set the Startup Type to Manual or Disable. Click on OK and the pop-up spam will be blocked.” I tried it, and it seems to work.
See also Pop-Up Stopper Pro (free version).