The distinction between Primary and Secondary Imagination is something that Coleridge writes about in his book of criticism entitled Biographia Literaria. For Coleridge, the Primary Imagination is the spontaneous act of creation that overtakes the poet, when an experience or emotions force him to write. Secondary Imagination, by contrast, is when the poet consciously dreams up his work and forces himself to write without the natural impulse of Primary Imagination.
Secondary Imagination can perhaps be seen when Coleridge in the first stanza of this poem consciously imagines what natural wonders and delights his friends are seeing whilst they go on a walk and he is "trapped" in his prison. Coleridge rather peevishly expresses his envy and annoyance at being forced to stay at home by imagining what amazing sights his friends will be enoying. However, particularly in the final stanza, the Primary Imagination is shown to manifest itself as Coleridge takes comfort and joy in the wonders of nature that he can see from his seat in the garden:
Pale beneath the blaze
Hung the transparent foliage; and I watch'dSome broad and sunny leaf, and lov'd to seeThe shadow of the leaf and stem aboveDappling its sunshine!