A mansion is a large dwelling house. The word itself derives (through Old French) from the Latin word mansio "dwelling", an abstract noun derived from the verb manere "to dwell". The English word "manse" originally defined a property large enough for the parish priest to maintain himself, but a mansion is no longer self-sustaining in this way (compare a Roman or medieval villa). 'Manor' comes from the same root— territorial holdings granted to a lord who would remain there— hence it is easy to see how the word 'Mansion' came to have its meaning.
The very first 'mansions', as we understand the term, were the villas built for the ruling class of the Roman Empire. Within a Roman city, patrician dwellings might be very extensive, but they rarely identified their grandeur to the street, beyond the public amenity of a sheltered portico. Nero's Domus Aurea on the Palatine Hill, Rome was organized as a series of glittering pavilions in gardens rather than a mansion.
Following the fall of Rome the practice of building unfortified villas ceased. Today, the oldest inhabited mansions around the world usually began their existence as fortified castles in the middle ages. As social conditions slowly changed and stabilised fortifications were able to be reduced, and over the centuries gave way to comfort. It became fashionable and possible for homes to be beautiful rather than grim and forbidding. Hence the modern mansion began to evolve.