Let's take an example to illustrate these concepts: suppose the user publishes a Structure Group which contains a Page which, in turn, contains an embedded Component Presentation and a Dynamic Component Presentation. This results in a single Publish Transaction for the given Structure Group. 

The first thing the Publisher does with a Publish Transaction is resolve the items to render. In this example, there are two Resolved Items: the Page and the Dynamic Component Presentation.

When rendering the Page (i.e. executing the Page Template), the following applies:

    Engine.PublishingContext.ResolvedItem = <The Page>
    Engine.PublishingContext.RenderContext.ContextItem = null

Typically, the Page Template will let the Render Engine render the Component Presentations on the Page. In general, Component Presentations are rendered separately, but embedded Component Presentations will be rendered in context of the Page:

    Engine.PublishingContext.ResolvedItem = <The embedded Component Presentation>
    Engine.PublishingContext.RenderContext.ContextItem = <The Page>

Finally, the resolved Dynamic Component Presentation will be rendered. Dynamic Component Presentations are normally rendered stand-alone (even if they are on a Page):

    Engine.PublishingContext.ResolvedItem = <The Dynamic Component Presentation>
    Engine.PublishingContext.RenderContext.ContextItem = null