The thesis deals with the development of the scanning tunneling microscope through time and its functioning. It describes its constituent parts, the preparation of tip and sample, their placement into the microscope, and the preparation of the microscope for measurement. It also outlines some of the important parameters for obtaining topography of the samples. To understand the functioning of the tunneling microscope, the thesis contains basics of quantum mechanics, such as the uncertainty principle and Schrödinger equation for tunneling. As for the analysis of graphite and HOPG topography, the thesis touches on point, linear and two-dimensional defects that appear on solids surfaces. The conclusion contains the topography of HOPG and graphene samples and its analysis. Observing the HOPG sample, we recognised cells representing individual carbon atoms and determined the size of individual fragments. As for the graphene sample, we identified the defects on its surface and determined terrace sizes and step heights.