Canvas is a game object where all the UI elements are children of it. It has a canvas component attached to it. All UI elements can only be visible inside a canvas. If you directly create an Image then Canvas will be created automatically with Image as its child.Canvas has some rendering modes which you can change by going to the canvas settings.
Following are the rendering modes of a Canvas:-
1. Screen Space-Overlay: In this mode the canvas is stored at the top of hierarchy if it is not done then UI may disappear from view. The canvas is scaled to fit the screen size and can be rendered directly without reference to screen or camera. If the screen changes resolution then canvas will change size to match.
2. Screen Space-Camera: In this mode the canvas is placed in front of a specified camera at some given distance the size of the UI does not change with the distance as it rescaled to fit camera frustum. The appearance of the UI will be affected by the camera settings and the canvas will automatically change size if the screen size or camera frustum changes.
3. World Space: In this mode the UI elements can be rendered in front or behind other objects in the scene based on how they are placed. Here the plane need not to face the camera and can be oriented according to you. This mode is useful for the UI's that has to be part of the world. You can change the size of the canvas by using its Rect Transform.