in photoshop, i believe it's called actions. in
psp it's called scripts.
i cant speak on the how-to in photoshop, but in
psp you can simply turn on a sort of 'record button' and it will log everything you do to one image until you turn the record off again. you can then save that as a new script and run it on another image and it will do exactly the same things you did in the original.
this is quite handy for some things, but can also be disastorous on others, as no two images are ever quite the same. but, you can also undo the whole thing, so no real disaster.
you can also write your own scripts, if you know how, and put in anything you want, within the programming capabilities of the scripting language and the overall program itself.