Like many email clients, you can set up message filters in Mozilla, and one of the actions you can choose for what to do with the message is to delete it from the POP3 server, and you could also move it to the trash folder.

Of course if the problem is spam, Mozilla has an adaptive junk mail filter that you can turn on (should be on by default IIRC). You basically "train" it to detect spam, and the more you use it the more accurate it becomes. Over time, you can get it to around 90% effective, which is quite impressive.