The ROLLBACK command in SQL is used to undo changes that have been made within a transaction before it has been committed. It allows you to revert to the last committed state in case an error occurs during a transaction.