Sed is a stream editor that performs basic text transformations on input streams like files or pipelines. It was developed in the 1970s and uses commands to edit text, either line-by-line or globally. This document discusses what sed is, its syntax, how it works by storing lines in pattern and hold spaces and applying commands sequentially, and provides an example of a sed script that swaps words beginning with "W" and "F".