The tradition of dressing up in costumes began—at least as far back in Western history as is recorded—with the Celts. The Celts believed that as one year ended and the next year began, the worlds of the dead and the living overlapped, and spirits and demons would roam the Earth. So, to dress up in the disguise of a demon was a way to trick the demons—who, if they saw you dressed up, would think you were a demon, too.
In the Middle Ages, the Catholic Church converted this ancient tradition into "All Saints Day" and "All Hallows Eve," adding saints and angels (along with demons) to the list of disguises people might employ.
This practice evolved as well, and on Hallowmas, children and poor people would walk about towns and villages in disguises, knocking on doors and begging for food or money in exchange for a song, a prayer, a jest, or a dance. This was called "guising," from "disguise."
All of these elements and practices are the foundation for the evolution of the "masque," more formalized and theatrical events that combined music, dance, performers in disguises as mythological or allegorical characters, and sometimes thin plots, though usually they were more likely to be processionals with lush descriptive narrations.
Some masques were performed in public at fairs and carnivals. By the time we reach the seventeenth century, when William Shakespeare wrote The Tempest, the masques were performed at court. Elizabeth I and her successor, James I, were fond of court masques, and there was a constant stream of masques done at the Tudor and Stuart courts. One of the most prolific writers of masques was the author Ben Jonson, whose masques were often staged on sets created by the renowned architect Inigo Jones.
Masques were often accompanied by "anti-masques," which were comic dance sequences of low and bawdy humor usually performed before the masque. They were then "transformed" into the orderly spectacle of the masque itself—the transformation is a statement of ethics, the chaotic disorder of the anti-masque turning to stability, bliss and concord as the masque itself. The anti-masque was invented by Ben Jonson and figures in many of his plays and masques.
William Shakespeare uses the masque to great effect in The Tempest. Much of act 4 of the play is an actual masque—in this case, a supernatural event that Prospero, the ruler of his magic isle, creates to present to his daughter, Miranda, and her suitor, Ferdinand. He tells his spirit Ariel to summon the spirits for the event:
PROSPERO: Thou and thy meaner fellows your last service
Did worthily perform; and I must use you
In such another trick. Go bring the rabble,
O'er whom I give thee power, here to this place:
Incite them to quick motion; for I must
Bestow upon the eyes of this young couple
Some vanity of mine art: it is my promise,
And they expect it from me.
Ariel returns and orders these "rabble" spirits to perform the masque, which is a rather stately promenade of various female mythological characters including Iris, Ceres, and Juno (respectively, the goddess of the rainbow, the goddess of the harvest, and the queen of the gods). The goddesses gossip for a while about who of the other gods may or may not be attending the event, then they bestow blessings upon Miranda and Ferdinand for their imminent wedding. Their language is regal, lush with images of nature, and as stately as one might find in any court masque performed for royalty:
CERES: Earth's increase, foison plenty,
Barns and garners never empty,
Vines and clustering bunches growing,
Plants with goodly burthen bowing;
Spring come to you at the farthest
In the very end of harvest!
Scarcity and want shall shun you;
Ceres' blessing so is on you.
As this is Shakespeare, he is up to his usual trick of taking a well-established form of theater and shaping it for his own dramatic devices. Now, after the formal masque, the character Iris is employed to call out more spirits to do a merry dance:
IRIS: You sunburnt sicklemen, of August weary,
Come hither from the furrow and be merry:
Make holiday; your rye-straw hats put on
And these fresh nymphs encounter every one
In country footing.
Enter certain Reapers, properly habited: they join with the Nymphs in a graceful dance; towards the end whereof PROSPERO starts suddenly, and speaks; after which, to a strange, hollow, and confused noise, they heavily vanish.
All seems to be going well in the masque when suddenly, something about the performance—perhaps the merry country dance of the Reapers and Nymphs—reminds Prospero that he has important unfinished business: he needs to deal with his miscreant servant Caliban, who is plotting to kill his master. Prospero becomes distraught and angry, as both Ferdinand and Miranda notice, and he—and Shakespeare—ends this masque with a powerful and influential piece of poetry:
PROSPERO: Our revels now are ended. These our actors,
As I foretold you, were all spirits and
Are melted into air, into thin air:
And, like the baseless fabric of this vision,
The cloud-capp'd towers, the gorgeous palaces,
The solemn temples, the great globe itself,
Ye all which it inherit, shall dissolve
And, like this insubstantial pageant faded,
Leave not a rack behind. We are such stuff
As dreams are made on, and our little life
Is rounded with a sleep.
Considering that this play was performed for the royal court, this is strong stuff. It is a reminder to everyone that the gorgeous revels of the masques themselves are insubstantial pageants, and these disguised spirits are only such stuff as dreams are made on.