How does saving history and restore works in changing tabs?

Hi,

we’d would like to understand how parallel history works on tabs - how it was stored and rewind when revisiting the tab

TIA