An eclipse occurs when one celestial object moves into the shadow of another. Here on earth, eclipses involve the sun and the earth's moon and can occur only when they are nearly in a straight line. More directly, the moon orbits earth on a different plane than the earth orbits the sun, and eclipses can occur only when the moon is close to the intersection of these two planes, which happens twice a year. Eclipses can occur for about two months around these intersection times (called nodes to astronomers). There can be from four to seven eclipses in a calendar year, which repeat according to various eclipse cycles.
How often does an eclipse happen?
During a total solar eclipse, the moon covers the entire sun because the two objects have the same apparent size when viewed from the earth. Years and years into the future, this won't be the case as the moon is gradually orbiting earth farther away from us (and will appear smaller). During a partial solar eclipse, the moon covers only part of the sun. Depending on how much of the sun is obstructed, the sky might turn interestingly darker (almost like you're looking at the world through sunglasses), but it won't grow to the nighttime-darkness of a total eclipse.
Lunar eclipses occur when the moon passes through the earth's shadow, and part or all of the moon is plunged into darkness.
If you're interested in when the next eclipses will be, check out this schedule from the U.S. Naval Observatory.