Open a text editor for example notepad not word or something with autocorrect etc.
Type the code of the batch file if you dont know any dos then again you can go on google and search up "msdos commands" and put one command on one line then on the next line put the next command to be executed for example:
When you are done typing the code then save the file as a .bat for example in notepad go file, save as, then in the title of the file put the name of the file then ".bat" (no space in between title and .bat for example: BatchFile.bat)
Now you should have successfully created a batch file now you can execute it.
Be carefull dos can damage your computer: always know what a command does before you use it.