We aim to present a tutorial on the detection, parameter estimation and statistical analysis of compact sources (far galaxies, galaxy clusters and Galactic dense emission regions) in cosmic microwave background observations. The topic is of great relevance for current and future cosmic microwave background missions because the presence of compact sources in the data introduces very significant biases in the determination of the cosmological parameters that determine the energy contain, origin and evolution of the universe and because compact sources themselves provide us with important information about the large scale structure of the universe.