There are two peaks because there are two different environments for the carbons. The carbon in the CH3 group is attached to 3 hydrogens and a carbon. The carbon in the CH2 group is attached to 2 hydrogens, a carbon and an oxygen. The two lines are in different places in the NMR spectrum because they need different external magnetic fields to bring them in to resonance at a particular radio frequency.
The 13C NMR spectrum for a more complicated compound
This is the 13C NMR spectrum for 1-methylethyl propanoate (also known as isopropyl propanoate or isopropyl propionate).
This time there are 5 lines in the spectrum. That means that there must be 5 different environments for the carbon atoms in the compound. Is that reasonable from the structure?
If you count the carbon atoms, there are 6 of them. So why only 5 lines? In this case, two of the carbons are in exactly the same environment. They are attached to exactly the same things. Look at the two CH3 groups on the right-hand side of the molecule.
You might reasonably ask why the carbon in the CH3 on the left is not also in the same environment. Just like the ones on the right, the carbon is attached to 3 hydrogens and another carbon. But the similarity is not exact - you have to chase the similarity along the rest of the molecule as well to be sure.
The carbon in the left-hand CH3 group is attached to a carbon atom which in turn is attached to a carbon with two oxygens on it - and so on down the molecule. That's not exactly the same environment as the carbons in the right-hand CH3 groups. They are attached to a carbon which is attached to a single oxygen - and so on down the molecule. We'll look at this spectrum again in detail on the next page - and look at some more similar examples as well. This all gets easier the more examples you look at.
For now, all you need to realize is that each line in a 13C NMR spectrum recognizes a carbon atom in one particular environment in the compound. If two (or more) carbon atoms in a compound have exactly the same environment, they will be represented by a single line.
Note
You might wonder why all this works, since only about 1% of carbon atoms are 13C. These are the only ones picked up by this form of NMR. If you had a single molecule of ethanol, then the chances are only about 1 in 50 of there being one 13C atom in it, and only about 1 in 10,000 of both being 13C.
But you have got to remember that you will be working with a sample containing huge numbers of molecules. The instrument can pick up the magnetic effect of the 13C nuclei in the carbon of the CH3 group and the carbon of the CH2 group even if they are in separate molecules. There's no need for them to be in the same one.