@Transactional is implemented via Spring AOP proxies: before entering the method Spring opens a transaction, and on exit it commits or rolls back based on exceptions and rollback rules. Propagation and isolation are configurable; self‑invocation bypasses the proxy.
Expanding on the short answer — what usually matters in practice:
A tiny example (an explanation template):
// Example: discuss trade-offs for "how-does-@transactional-work?"
function explain() {
// Start from the core idea:
// It uses AOP proxies to wrap method execution. It opens a transaction before execution and
}