I am a chess beginner, having played over 500 games. However, I never understood gambits, despite the fact that I am very good at openings. I always play the Queen's Opening, King's Opening, or the knight opening Nf3. I haven't cared about gambits. What exactly is a gambit and why should I learn about them?
A gambit is the giving up of a pawn in the opening to gain a lead in development and/or open lines and/or a weakening in the opponent's position.
A sacrifice is the giving up of a piece to gain what a gambit does. It also can be used to close lines, setup a blockade, attract a piece to a square, destroy the pawn shelter around the king, and other gains.
Since a sacrifice is more of an investment, it usually involves an attack on the king.
The Queen's Gambit is normally not a true gambit as White can always regain the pawn. The Queen's Gambit starts with 1. d4 d5 2. c4. The pawn is offered to lessen Black's control of the center. This action is considered good according to chess strategy.
Sooner or later you will have to face a gambit. Learning before the game greatly increases you chances of not losing in the first ten moves. Games in which a gambit is accepted are often full of tactics and a slashing king hunt. These games are considered to be more exciting.
According to Wikipedia:
A gambit (from ancient Italian gambetto, meaning "to trip") is a chess opening in which a player, more often White, sacrifices material, usually a pawn, with the hope of achieving a resulting advantageous position
As @bof points out in his comment:
A sacrifice is not necessarily a piece sacrifice; it can be an exchange sacrifice or a pawn sacrifice. A gambit is not necessarily the sacrifice of a pawn; it can involve sacrificing two pawns (Danish Gambit) or three pawns (Cunningham Gambit) or a piece (Halloween Gambit, Muzio Gambit, Allgaier Gambit)