Even if no visible astronomical objects are present in given part of the sky, there always is some low luminosity present, due mostly to light diffusion from the atmosphere (diffusion of both incoming light from nearby sources, and of man-made Earth sources like cities). In the visible band, luminosity level is around the 22nd magnitude per square-arcsecond: a very low level, but anyway well within the limits of the current generation of telescopes. The Hubble Space Telescope does not suffer from this problem.
In infrared astronomy, the problem can be much worse: due to the longer wavelengths involved, the sky and the telescope themselves are a source of light. To work around this problem, infrared telescopes often use a technique called chopping(fr), where a mirror rapidly oscillates between the object of interest and the nearby, empty sky. The two images can be subtracted, leaving hopefully only the incoming light from the source.
There are several sources which contribute to the brightness of the (night) sky. Some of these are instrumental, or due to the presence of the atmosphere (like the airglow), in the case of ground based instruments. Even if we able to minimize the effect of instrumental and atmospherical components (e.g. using a spacecraft), there are still several astrophysical components contributing to the sky background: these could be sets of point sources like faint asteroids, Galactic stars and far away galaxies, as well as diffuse sources like dust in the Solar System, in the Milky Way, and in the intergalactic space. The actual importance of a specific component depends mostly of the wavelength of the measurement. The uncertainty (or noise) of the measurements caused by the astrophysical components of the sky background is called confusion noise.
In astronomical CCD technology, background is usually referred to the overall optical "noise" of the system, that is, the incoming light on the CCD sensor in absence of light sources. This background can originate from electronic noise in the CCD, from not-well-masked lights nearby the telescope, and so on. An exposure on an empty patch of the sky is also called a background, and is the sum of the system background level plus the sky's one.
A background frame is often the first exposure in an astronomical observation with a CCD: the frame will then be subtracted from the actual observation result, leaving in theory only the incoming light from the astronomical object being observed.