Well, resoultion is determined by the CCD that takes light and converts it into an electonic image. The CCD is essentially the film. This is what the focused light strikes. Unlike film, there is a wide, wide range in the "resolving power" of the CCD. All they way to web cams that do 640x480 to thousands by thousands.
This is where megapixels comes in. More megapixels == more resoltuion == larger image.