Scanning tunneling microscopy provides new-ways of studying electron c
onfinement and quantum size effects. In this paper we will summarize t
he results obtained in the study of the interaction between a 2D elect
ron gas and different structures, some of them natural and others arti
ficially constructed using another unique ability of STM: modify and m
anipulate materials at the atomic and the nanometer scale.