The script command in Unix is used to record/spool terminal sessions. It creates a typescript file containing everything printed to the terminal during the session, including both input and output. It's commonly used for logging or debugging terminal interactions.