Template inheritance in Django works by defining a base template with block placeholders. The child template uses the {% extends %} tag to inherit the base layout. It then overrides blocks defined in the base using {% block %} tags to insert its own content. When rendering, Django combines the base template's structure with the child's block content to produce the final HTML. This process allows reuse of common layout code and easy customization. The execution table shows each step: reading base, extending in child, overriding blocks, combining templates, and outputting final HTML. Variables like the content block start empty and get replaced by child content. Key points include the need for {% block %} tags in child to override base blocks, and that without overriding, base block content remains. This method keeps templates clean and maintainable.