A piece of software that sorts mail, and more. Much more.

It can run all mail you receive through programs, thus creating autoresponders, or it can merely puzzle you with it's slightly obscure language of recipes.

Its mode of operating is your MTA calls it when doing local mail delivery, and pipes the mail in question through it. Procmail then reads it's run-commands file named ~/.procmailrc and tries to match the message against every rule specified therein. If the message matches, the corresponding action is performed. There is a lot you can do in "the corresponding action" however, so this can get complex quickly.

If your local MTA isn't set up to run locally delivered mail through procmail but procmail is installed (or you installed it yourself), often creating ~/.forward and putting "|/path/to/procmail#your-userid-here" in it will make local mail be delivered through procmail for you.

The reason for the #your-userid-here; thing is mostly historical, this is actually a comment and not executed, but is a workaround for a bug where the MTA gets confused; it's usually not necessary. Then again, it never hurts, the file's going to use up an entire block of diskspace on most filesystems anyway.