Cooldown is the time it takes from casting a spell or drinking a potion until a new spell can be cast, or a new potion consumed.
Contents
Cooldown versus Cast Time
It's part of the game to prevent a player from doing too much at once just because he or she presses the mouse button. It's usually part of the design, so that powerful spells have a longer cooldown, and can't be used repeatedly.
Sometimes a spell or ability have a long cooldown because it has a short cast time. These two are often balanced against each other. The advantage of a long cooldown over a long cast time is that a player can still run around and use other spells while waiting for the powerful more spell's cooldown to run out.
A cooldown is not bound to only spells or abilities. In Diablo 3, Healing Potions will have a cooldown to prevent players from spamming heals like in its predecessor.
Global Cooldown
There is in some games also something called a "global cooldown", which will affect all spells, skills and items. It's a measure making it easier to balance the game, limiting the number of things a player can do at once. All skills are not necessarily affected by global cooldown, or causes it.
History
Cooldowns were originally set primarily on CPU/GPU intensive graphic effects that could cause lag in multiplayer games when a player spams that spell.