Start here. This is the direct spoken answer to practice first.
Overview
A portal changes physical DOM placement without moving the component out of its React ownership and event tree.
A portal renders children into a different DOM container, which helps overlays escape clipping and stacking contexts. The child still belongs to the same React tree, so context works and events bubble through React ancestors rather than following only the DOM tree. A modal also needs deliberate focus movement, keyboard handling, accessible naming, and focus restoration.