Photoelectric effect, photoelectron spectroscopy (XPS) and scanning photoelectron microscopy (SPEM) are explained in this short lecture. The photoelectric effect occurs when the inner shell electrons of the sample atoms are kicked out by high energy electromagnetic radiation. These electrons, that were kicked out, are called photoelectrons and their energy depends on the energy of the exciting radiation, the electrons initial binding energy and on the work function. When having a radiation source with well defined energy and measuring the energy of the emitted electrons, it is possible to get information about the samples composition and chemical state. In the case of photoelectron microscopy the exciting beam is focused into a narrow spot on the sample surface. The sample is then moved in such a way that the spot moves row by row across the sample surface and as a result photoelectrons are emitted from each irradiated spot. By collecting these photoelectrons, it is possible to map the composition or chemical state across the selected sample area (for example 100 x 100 microns area on a 2 x 2 cm sample). Photoelectrons can escape the material only from near the surface and this means that these methods are very surface sensitive, which makes them extremely useful for surface studies. This also means that the surfaces need to be very clean (cleaned with ion bombardment before measurements) and therefore ultra-high vacuum is needed.