From the photoshop help file,
To create a new action:
1. Open a file.
2. In the Actions palette, click the New Action button , or choose New Action from the palette menu.
3. Enter a name for the action.
4. (Photoshop) Choose a set from the pop-up menu.
5. If desired, set one or both of the following options:
-Assign a keyboard shortcut to the action. You can choose any combination of a Function key, the Ctrl key (Windows) or Command key (Mac OS), and the Shift key (for example, Ctrl+Shift+F3).
- (Photoshop) Assign a color for display in Button Mode.
6. Click Record. The Record button in the Actions palette turns red round dot.
Important: When recording the Save As command, do not change the filename. If you enter a new filename, Photoshop records the filename and uses that filename each time you run the action. Before saving, if you navigate to a different folder, you can specify a different location without having to specify a filename.
7. Choose the commands, and perform the operations you want to record.
8. To stop recording, click the Stop button, choose Stop Recording from the Actions palette menu, or press the Escape key. To resume recording in the same action, choose Start Recording from the Actions palette menu.
For batch job, you can search for "To batch-process files using the Batch command" in the help file.
Hope this helps.