The resolution of an image is a measure of its sharpness, or how small a detail can be resolved.
In digital cameras, the theoretical resolution is limited by the max. number of pixels in an image. In common digital cameras the imaging sensor has a certain rectangular matrix of light sensitive pixels. The pixels of the usable rectangular part of that area is the maximum theoretical resolution, and that inner rectangle's size defines also the frame size of that camera.
In a (computer) printer, the resolution is measured in pixels-, dots- or lines-per-inch (dpi,lpi) - or, less commonly, per millimetre.
In film photography, resolution can be measured in terms of the maximum number lines per millimetre (or per inch) that can be produced.
Resolution can be measured for an individual component, such as the film or image sensor, or can be for a whole optical system - e.g. the combination of a particular lens and its mount and film and film transport. The mount and transport can have a small effect on the resolution, as keeping the film flat and perpendicular to the optical axis is important for consistent focus across the image.
In digicam tests the resolution of details is measured and the results given as "effective megapixels", or, like in film photography, as number of lines, which probably might be lower than the number of rows of light sensitive pixel areas on the sensor. For system cameras the results often depend on the lens used for the test, so that tests must be critically read concerning whether cheap kit lens or better prime lens was used with the camera.