The basic principles are illustrated here.With a single lens, there is no limit to the image size. However the camera will have a 'sensor' which captures part of the image.

In this example, with a small sensor we could capture the elephants head while a larger sensor would capture the image of the entire elephant. With the original cameras, the 'sensor' was the size of the photograph you were going to have. Later, by effectively taking a second photograph from the negative but this time enlarging the image, photographers were able to have camera with a sensor smaller than the photograph they were taking. In fact, by this enlargement process, people were able to reproduce very large photographs. However, the greater the enlargement, the more magnified any limitations of the original image become.
With 35mm film cameras, the image sensor became the 35mm film. To use a different size 'sensor' film had to be mass produced in the relevant size. For high quality professional photographs, larger film was used as this requires less enlargement to produce any given size photographic print. Today, with digital sensors, there is no need to able to obtain 'film' matching the image size the camera is designed for, the 'film' is built into the camera. This leaves camera makers free to use whatever size 'sensor' they like.
The important point to remember is that a smaller sensor does not make a smaller image of the same subject, a
smaller sensor captures a smaller section of the image. The effect is shown here:It can be seen that if the photographer wishes to capture and image of the complete elephant with the smaller sensor, a different lens must be chosen.
Note that the image being captured has the same detail in both examples.
'Digital Zoom'.
Despite both images having the same detail, there is an effect where it appears we have 'zoomed in' on the elephants head simply by using the smaller sensor. Of course, the only real zooming will be by way of enlarging the picture more to make a print of our photo. In fact, the same result could be gained from the larger picture by 'cropping' (or cutting out) the section of the photo we want and making the same enlargement. This effect is called 'digital zoom', where we use only part of the sensor, then digitally enlarge the image. It is not a 'real zoom' since we see no more detail of the subject, but it does allow us to concentrate on the area we are interested in. This is the process used by most current phone cameras, which is why 'zooming' will usually not make small print any more readable than the original, since no more detail is captured. However with an optical zoom which changes the image being captured, and 'zooming in' optically will allow fine print to become readable and other fine detail to be seen.
While camera phones and some other cameras allow this 'digital zooming' on demand, simply moving to a smaller sensor camera effectively produces this 'digital zooming', which sometimes gives rise to claims that the smaller sensor camera allow capturing more distant objects in detail with the same lens. This can be misleading and I will cover it in more detail later!