The filename is whatever.bat. You run it by typing 'whatever'.
You need to have the input file in the same directory or specify the full path name to the file.
Modify 'MyFilename.txt' and 'Results.txt' to what you would like.
This should work according to all of the batch scripting that I've read:
@echo off
for /F %a in MyFilename.txt do nslookup %a >> Results.txt