The classic sweeper played behind the two centre-backs, cleaning up anything that slipped through. Franz Beckenbauer redefined the role by also carrying the ball forward into midfield.
Pure sweepers are rare today, but the modern "ball-playing centre-back" descends from the libero tradition: central defenders who advance with the ball and break lines with passing.
Some teams functionally use a sweeper-keeper — a goalkeeper who steps far out of his box to cover passes behind a high line.