Units are produced from structures. These units build up your army and perform essential roles such as attacking and base-building. Most units consume supply, which limits the number of units deployed at once.
Many units have additional abilities.
Abilities are attributes of a unit that differentiate their potential uses from those of other units. These include Flying and Detector and other similar traits. These include manually activated, conditionally activated, auto-cast, passive, or even permanently active effects. Some abilities can be switched to autocast, so they will be activated automatically when certain conditions are met.
Spells are abilities that can be activated manually. Most spellcaster types use up a certain amount of stored Energy, which starts out at 50 (and can be upgraded to 75 in the case of certain units) and slowly builds to 200 at a rate of about 1 per game second. Generally speaking, spells in StarCraft II radically change conditions of units or the map or fulfill other essential functions and have no cooldown time, although they do have a cast time before they are activated, sometimes during which the caster is helpless.
Peon is a general term for Worker, inherited from WarCraft terminology. They are produced from the main base (or Townhall) for each race and cannot be made from any other buildings. They harvest resources and construct buildings. They have a weak melee attack that can not be upgraded but can help in critical early-game situations (or all-in rushes).
Upgrades improve the functionality of units by improving their basic statistics or granting them additional abilities. Most upgrades are retroactive; preexisting units benefit. Upgrades that affect a unit's starting conditions (such as the Infestor's Pathogen Glands upgrade) do not affect extant units.
All upgrades take time and resources to complete. They are researched at associated technology buildings. Most upgrades require Vespene Gas as well as Minerals. There are sets of upgrades that in general apply to all races.
Weapon / Armor Upgrades increase units' attack damage or armor. Attack upgrades apply to each packet, i.e., units with multiple attacks will especially benefit from attack upgrades. Conversely, armor is applied to each packet, so armor is doubly effective against these units. For example, a Zealot attacking a Zergling with level 1 armor will deal 2 less damage, because his Psi Blades deal their damage in two packets. Some units gain more than one point of damage per upgrade, but armor upgrades always have the value one. The upgrade factor is given in parentheses after the basic damage, e.g. 15 (+3). Typically, specific two racial buildings are used for upgrades to most units. They are the Engineering Bay and Armory, the Evolution Chamber and Spire and the Forge and Cybernetics Core.
These general guidelines do not necessarily apply to unit-specific upgrades; for example, the Ultralisk's Chitinous Plating upgrade adds two armor, rather than the usual one.
Most spellcasters can be upgraded to spawn with 75 Energy instead of 50.
Transformations are "upgrades" applied to singular targeted buildings or units that change their functionality (referred to in-game as mutating, upgrading, or building buildings or units). They may require the expending of resources. Examples include the Command Center to Orbital Command upgrade,
Corruptor to Broodlord upgrade, and the Gateway to Warpgate ability.