Jem and Scout hear the "solitary mocker" on the way to the Halloween pageant. The mocker is an actual mockingbird who, in its innocence, is "blissfully" unaware of any potential enemies around. Throughout the novel, the mockingbird is a symbol of innocence. As Miss Maudie says earlier in the novel, mockingbirds "don’t do one thing but make music for us to enjoy. They don’t eat up people’s gardens, don’t nest in corncribs, they don’t do one thing but sing their hearts out for us."
In Chapter 28, on the way to the pageant, the actual mockingbird retains this sense of innocence and it is also a foreshadowing moment.
High above us in the darkness a solitary mocker poured out his repertoire in blissful unawareness of whose tree he sat in, plunging from the shrill kee, kee of the sunflower bird to the irascible qua-ack of a bluejay, to the sad lament of Poor Will, Poor Will, Poor Will.
Shortly after hearing the mockingbird, Cecil Jacobs jumps out and scares Jem and Scout: a foreshadowing false alarm. On the way home, Bob Ewell attacks them. But the moment/person the mockingbird foreshadowed is another (symbolically of course) "solitary" mockingbird that comes to Jem's and Scout's rescue: Boo Radley. Boo fits the description of the innocent mockingbird who keeps to himself and only helps others ("sings his heart out"); namely, he helps Jem and Scout, this time by protecting them from Bob Ewell.