A chess clock is a timing device used to keep games moving. When a player's time runs out, she faces some penalty, frequently the loss of the game. For questions about time controls or time management, use the respective tags time-control and time-management.
There are many types of chess clocks and many different ways to use them. Older chess clocks were literally two mechanical clocks connected in tandem. Each clock had a button on top. When a player pushed the button over his clock, a lever would stop his clock but start his opponent's. At the 12 o'clock position, there's a 'flag' controlled by gravity. As the minute hand approaches 12 it lifts the flag. As the minute hand passes 'noon', the flag falls by gravity. This generally signifies a loss on time. Before the game, the minute hands have to be set in exactly the right position.
Modern clocks are digital. While fundamentally the same (there are two tandem clocks with a button controlling each) they allow for additional time control features that would be next to impossible with mechanical clocks.
Chess clocks were invented when certain players known for the 'sitzfleisch' would spend hours on moves, delaying tournaments terribly, and rendering modern tournaments impossible.
Hand-in-hand with the clock are time controls - how the clock is used. There are innumerable variations, but a common time control is "game in X minutes" which means each player has a total of X minutes to win before they lose on time. There are certain rules to prevent a demonstrably lost player from winning on time. For example a bare K against K+Q will never win on time. Instead, a draw by insufficient mating material is declared.