To begin answering this question you should understand the meaning of a viceroy. A viceroy is a royal official who runs a country or province in the name of a king or sovereign. So this make a viceroyalty the term of service of a viceroy and/or the land that the viceroy governs.
Historically there have been many viceroyalties. New France was the area in North America that was colonized by the French. "At its peak in 1712 (before the Treaty of Utrecht), the territory of New France extended from Newfoundland to the Rocky Mountains and from Hudson Bay to the Gulf of Mexico." For more viceroyalties see the link below.
A viceroyalty was the largest level of colonies in the Spanish Empire in the new world. Viceroyalties could have smaller subdivisions which were all under the rule of the viceroyalty.
A vieroyalty was run, no surprisingly, by a man called a viceroy. This person (as the term implies) acted in the place of the king. So he was essentially the king within that colony. That means, for example, that the Viceroy of Mexico had no one in the colony who could tell him what to do or who could override one of his decisions.
Viceroyalty is a country or a colony administered by a viceroy. The word or title viceroy it self means the representative of a king (or a queen). The viceroy rules or administer a colony in the name of a King.
As implied in the post #1 above Spain called many of its colonies in America viceroyalties. These colonies included La Plata, New Granada, New Spain and Peru. However there have been many other colonies administered by viceroys. For example, British government appointed Viceroys for administration of British ruled India.