Press TAB to be able to write, or SAY bind and remove the SAY so that you only have the > and write
pdetails
you see a small HUD (i.e. graphics on the screen) that display all playernames and ID numbers. Lets say that you don't want to hear what someone says, spams all the time, and his player ID is 6. You do as above (the TAB or SAY thing) and write:
ignore 6
You see a small i appearing to the HUD next to that player you just ignored and you hear nothing of him after that. If you for some reason want to unignore him, just write ignore 6 again.