The pathloss correction step calculates the correction to apply to spectra when the 1-d extraction is performed. This correction accounts for losses in the optical system due to light being scattered outside the grating, and to light not passing through the aperture.
The correction is applicable to NIRSPEC IFU, MSA and FIXEDSLIT exposure types, to NIRISS SOSS data, and to MIRI LRS and MRS data, although the MIRI and NIRISS corrections were not implemented in Build 7. The description of how the reference files were created and how they are to be applied to NIRSPEC data is given in ESA-JWST-SCI-NRS-TN-2016-004 (P. Ferruit: The correction of path losses for uniform and point sources).
This link to the JWST pipeline provides detailed information on this step.