Since Nathan Radley plugs the knothole into which Boo has placed gifts such as chewing gum and two carved soap images of a boy and girl in the likeness of Jem and Scout in Chapter Seven of To Kill a Mockingbird, it seems that he is probably aware of the presence of Jem and Dill in his yard in Chapter Six.
As the boys sneak up to the Radley house in the moonlight and pass by the darkened windows, it is probable that Boo may have been looking out since he does watch the children regularly. And, while Boo may have been peering out the window, Nathan, his brother observes him, perhaps, and then, hearing the boys, investigates. In so doing, Nathan Radley decides to scare the boys by firing his shotgun; he does not attempt really to shoot anyone. In the South, such an act is not uncommon, even to this day if people live in the country. For, the blast of a shotgun is loud and frightening, and it acts as a forbidding warning to trespassers.
In Chapter Six of Harper Lee's novel, To Kill a Mockingbird, Jem, Dill and an unwilling Scout have crept onto the Radley property so the boys can look in a window and try to see Boo inside the house.
Under the cover of darkness, the children creep through yards and garden and make their way to the Radley house as quietly as possible. They make sure the gate between the Radley's garden and yard doesn't alert the Radleys. Dill looks in one window, but sees nothing. Jem climbs up the stairs to look through another window from the porch, but a squeaky step must alert Mr. Radley. (There is a shadow on the porch which is probably not Mr. Radley, or he would have yelled at them right away. We might assume this was Boo. However, seeing the shadow, all three children bolt out of the yard and off of the property, climbing under the fence that leads into the school yard.) As the three kids run, they hear the sound of a gunshot. Jem is running hard, gasping for breaths that sound like sobs. The children are terrified.
When they have calmed themselves, they casually appear coming down the street, while the adults in the surrounding houses have come out to see what the problem is. When the children ask what has happened, they are told that Mr. Radley shot at a trespasser.
Mr. Radley shot at a Negro in his collard patch.
When the children innocently ask if he hit the man, Miss Stephanie says he did not because he shot into the air. It seems that the children were especially lucky that he did, or one of them might have been seriously hurt. All they have to do now is explain why Jem doesn't have his pants on—as his "britches" lie on the ground, still attached to the fence they got caught on while the children ran "for their lives."