A shortage occurs when the quantity demanded of a good or service exceeds the quantity supplied at the prevailing market price. This imbalance between supply and demand results in a scarcity of the item, leading to increased competition and potential price increases.