The foreach statement goes through the list of files to process them in the specified task.
Execute in this example will run (execute) the task (radiometric calibration) and output the file to reflectance (or radiance depending on what you choose). Then you will need to use another task (ENVIRaster::Export) to export the ENVI format file to TIFF.
Radiometric calibration to TOA reflectance:
http://www.exelisvis.com/docs/ENVIRad...
Note that because Landsat MTL files have more than one dataset (Pan+MS), you will need to choose which dataset to process and loop through each one to get both the Pan and MS file calibrated.
Export to TIFF:
http://www.exelisvis.com/docs/ENVIRas...