Matte paintings are used to create “virtual sets” and “digital backlots”. They can be used to create entire new sets, or to extend portions of an existing set. Traditional matte painting is done optically, by painting on top of a piece of glass to be composited with the original footage (Wikipedia).
The movie embedded below illustrates the process of painting a city background in Photoshop CS3, timelapsed over 6 minutes it provides an interesting insight into creating digital cityscapes:
Credit for the movie goes to titoff77, his work is inspired by Dylon Cole (Dylon’s site is well worth a look, especially the Daredevil section for urban images.)
really great tutorial