As Steven says, you need a firewall. 'Messenger spam', is not in itself
harmful, but is symptomatic of a larger problem - your computer has ports
open from the Internet.
You can disable the Messenger service, but that is unwise as a solution as
you'll still have the underlying problem that caused you to get the messages
in the first place - consider the messages a useful warning that you have no
protection from the Internet. This is all too important now, given the
recent rash of RPC worms....
For a standalone machine, see
www.sygate.com for a free personal firewall,
or if using Windows XP, you can enable the built-in internet connection
firewall (ICF).
See
http://securityadmin.info/faq.htm for more info. Also,
http://www.mvps.org/winhelp2002/nopopups.htm is a good resource - although
for browser popups, you might want to consider
http://toolbar.google.com -
it works like a champ and is also handy for searching.