Adobe allows you to record a set of performed tasks and play them again later to perform the same steps.
This is a simple example on how to record an action on Adobe Photoshop to make a picture black and white, reduce the document's size and save the picture over the original.
Open any picture in Photoshop (make sure that the picture is a copy of the original as the file will be modified).
Click on the top menu Window and press "Actions" to show the Actions toolbar.
Click on the "Create new Action" icon. A popup will ask for a name of the action, you can call it "B&W + Save".
From now on, everything that you do in Photoshop will be recorded in your new action.
Click CTRL-U to open the Saturation panel and reduce the saturation to 0, then click OK.
Go to File > Save, and then close the image (or CTRL-S) and choose quality 10.
Close the image file.
In the Actions toolbar, click the "Stop playing/recording" icon to stop recording your action.
Now you have an action that makes a picture black and white, saves, and then closes the image.
Open a color image. Select the "B&W + Save" action and click the "Play selection" icon. If everything goes well, Photoshop will make black and white your image, save it and close.