In the App Router each folder is a route segment that maps to the URL. A layout.tsx in a segment wraps all child pages and layouts below it; nested layouts compose and can persist between navigations, enabling shared UI like navbars or sidebars.