Caps Lock is a button on a keyboard that changes if a letter should be capitalized or not. It is located in the position of a similar Shift lock key (and sometimes a Ctrl key) found in some other keyboard layouts.
The actual Caps Lock behaviour depends on the operating system and driver as well as the chosen local keyboard layout. On non-IBM compatible computers it may also depend on the keyboard hardware itself.
Typical Caps Lock behaviour is that pressing the key sets an input mode in which all typed letters are uppercase by default (i.e. in All caps). The keyboard remains in Caps Lock mode until the key is pressed again.
Several variants of this behaviour exist:
In some keyboard layouts, the status of the Caps Lock key only changes the meaning of the alphabet keys (verbatim as per capital shift lock), not that of the number row, which then still requires the Shift key to be pressed to reach the alternative key definitions.
Depending on the keyboard layout used, holding down the shift key while Caps Lock is already on is either ignored (because all keys are already shifted), will also shift keys which are not being shifted by Caps Lock alone (see above) or effectively invert the shifting status of each key, so that where Caps Lock shifts all keys, pressing Shift will temporarily switch to lowercase again, whereas on a keyboard where Caps Lock only shifts alphabet keys, pressing Shift will temporarily switch the alpha keys to lowercase while shifting the number row as normal. Some keyboard layouts implement a fourth variant, where Shift will temporarily invoke two different sets of alternative key definitions depending on if Caps Lock is currently active or not. The inverting behaviour of the Shift key is the most common variant on English keyboards.