These lines have been quoted from "Elegy Written in a Country Churchyard", composed by Thomas Gray, an eighteenth century poet. Here the poet speaks about himself through an imaginary "hoary-headed swain."
Towards the end of the poem, the poet visualises his own death. He identifies himself with the rustic villagers who died unknown after living a very simple life in the lap of nature. He too left madding cities and retired to simple life in the countryside where he had been living a very carefree life. In contrast to the colourful life of his city friends, he was unknown to the people of the world just like the humble villagers. For this reason, his death was expected to be found out only by the shepherds living in that locality. Finding him not in the places of his regular visits, the shepherds would meet his dead body in a grave under a hawthorn tree in the country churchyard. This imagination of the poet is full of pathos and well matched with the mourning mood of the poem.