Sensors come in different sizes. Generally speaking, bigger sensors mean better image quality. Most entry level DSLRs have what is known as an APS-C sized sensor. Professional DSLRs have a sensor that is referred to as full frame and is the same size as a 35mm film frame. Compact cameras have smaller sensors, and phones have even smaller sensors.
This diagram shows the relative size of sensors in different types of camera.
In terms of image quality, large sensors have advantages over small sensors.
Due to their greater area, large sensors can accommodate more pixels, or they can accommodate the same number of pixels as a smaller sensor, but these pixels can be of a larger size. Larger pixels are better at collecting the information from light which means they can capture a greater range of colours and shades.
The gradation of shades within the bright and dark parts of photos is called dynamic range. Larger sensors have a greater dynamic range and give a smoother gradation between light and dark, allowing more detail in the shadow and highlight areas of your photo, the first diagram below shows this. Small sensors don’t have the ability to show such a large range of tones and will will show less of a range of tones, as in the second diagram below.
The range of colours that a pixel can capture is called bit depth. Larger pixels usually have a higher bit depth and large sensors can therefore capture a broader range of colours than small sensors.
In summary, a larger sensor will create a better image with a greater range of colours plus lots of details in the dark and bright parts of the photo.
Larger pixels are also better at collecting light in dimly lit conditions, this helps when taking photos in low light conditions using high ISO, but more on that later.
You don’t need to worry about the technicalities of all this, but knowing that your camera has a nice big sensor should give some reassurance that it is worth carrying your large heavy DSLR instead of your smartphone if you want to be able to take the best possible photos.