Sample is placed in magnetic field and irradiated with a pulse of all useful frequencies giving a complex signal that is mathematically manipulated so that the spectrum is shown in the normal manner. This mathematic manipulation is called Fourier-transform. As with proton NMR, each distinct carbon has a signal and the number of signals shows how many differecnt kinds of carbon are present in the molecule. As with protons, electronegative elements cause downfield shifts. So carbons attached to oxygen, halogens, etc. appear downfield from normal alkane carbons.
Hybridization plays a role in shift also.
NMR is not always a function of how many of each kind of carbon are present. Other factors influence this. In some newer instruments can get an integration. Will not worry about this. Since 13 C is so rare, it is unlikely that two 13 C are adjacent to each other and will couple.