What do you understand by the term ‘allegory’? How did a female figure become an allegory of a nation?

When an abstract idea is expressed through a person or a thing, it is called an allegory. It is the personification of a country.
While it is easy enough to represent a ruler through a portrait or a statue, it is difficult to give a face to a nation. Artists in the 18th and 19th centuries found a way out by personifying a nation. In other words, they represented a country as if it were a person. Nations were then portrayed as female figures. The female form that was chosen to personify the nation did not stand for any particular woman in real life, rather it would give an abstract idea of the nation in concrete form. This is how the female figure became an allegory of the nation.