Cancelling a transaction means rolls the transaction to the beginning. It aborts any changes made during the transaction and the state of database is returned to what it was before the transaction began to execute.
Rollback command is used for the same.