Start here. This is the direct spoken answer to practice first.
Overview
The important difference is not visual reuse; it is whether the shared subtree keeps its identity across child-route navigation.
A layout wraps route segments and preserves its mounted UI and client state while users navigate between its children. A template has a similar shape, but Next.js gives it a new key for navigation, so its client subtree remounts, local state resets, and Effects run again. I use a layout for stable navigation, providers, and shells, and a template only when that reset is intentional.