localStorage persists across sessions until cleared; sessionStorage lasts only for the tab. Both store strings: setItem(key, value), getItem(key), removeItem, clear. To store objects, JSON.stringify on the way in and JSON.parse on the way out.
It's perfect for preferences, drafts, and local-first apps (this academy stores your progress here). Limits are ~5-10MB per origin, and it's readable by any script on the page — never store secrets.