All nuclei in molecules are surrounded by electron clouds. When a uniform external magnetic field is applied to a molecule, the circulating electron clouds set up tiny local magnetic fields of their own. These local magnetic fields act in opposition to the applied field, so that the effective field actually felt by a nucleus is a bit smaller than the applied field.
Beffective = Bapplied − Blocal
This effect is termed shielding. Each nucleus is shielded to a slightly different extent, so each unique kind of proton in a molecule resonates at a slightly different frequency and gives rise to a unique NMR signal.