Matte painting is the creation of imaginary or realistic sets in movies. It grants access to places that cameras cannot reach and helps build fictional universes. Mattes can cover a full frame or just a portion and are inserted in the post-production process.
Matte painting still exists today but in a digital form. Whether traditional or digital, both required talented artists to go above and beyond.
In the film age of cinema painters would have to make additional considerations such as the distortion of a lens or the way a particular film stock renders colour.
Once you start looking for matte's you are going to see them everywhere!
Matte paintings are generally combined with live-action footage. On set, the cinematographer will mask (cover) the area where the matte painting will go. In turn, the matte painting will mask the area where the live-action footage shot will go.
The shots below depict Mr Stay Puft terrorising the city. The extension on the apartment building is a matte painting, and the masked area is where other components, such as the miniature set, original footage of the actors, etc, will go.
Watch the video below (use timestamp) to see how this is done
Top left: Actors shot in studio
Bottom left: Miniature set
Top right: Matte painting
Bottom right: all elements combined in post-production
VFX Geek
'Movie Magic HD Episode 8 Matte Painting'
Overview of matte painting which is used in all major movies both then and today (but now digital).
Go from 14:42 to see how mattes are blended.
Mattepaint Blog
This article explains the history of matte painting and the many considerations painters had to make to achieve an landscape and atmosphere appropriate to the scene.