SAPScript is a tool used to create formatted forms in SAP. It extracts data from SAP using an output program written in ABAP and places it into a layout set template, which formats the data for the form. The output program accesses SAP data, while the layout set defines how the extracted data will be arranged on the printed form. SAPScripts combine an output program and layout set to produce customized printed forms like invoices and purchase orders from SAP.