Start here. This is the direct spoken answer to practice first.
Overview
Changing a managed object records intent in memory; flush synchronizes that intent with SQL, and commit completes the transaction.
Hibernate keeps track of managed entity state and detects changes, usually by comparing it with a snapshot or enhanced tracking data. At flush, it translates pending inserts, updates, and deletes into SQL so the database state is synchronized with the persistence context. Flush commonly happens before transaction commit and can also happen before a query whose result could depend on pending changes. A successful flush is not a commit; the transaction can still roll back.