Nuclear magnetic resonance: general concept and applications