A transaction in a database management system goes through several states. It starts with the 'Start' state when the transaction begins. Then it moves to 'Active' while operations are performed. After operations, if the transaction is successful, it moves to 'Partially Committed' where all operations are done but changes are not yet permanent. Then it moves to 'Committed' where changes are saved permanently. Finally, the transaction ends successfully. If an error occurs during 'Active', the transaction moves to 'Failed' and then 'Aborted', rolling back changes and ending the transaction without saving. This flow ensures data integrity and consistency.