Atomic and molecular line emission from protoplanetary disks contains key information of their detailed physical and chemical structures. To unravel those structures, we need to understand line radiative transfer in dusty media and the statistical equilibrium, especially of molecules. I describe here the basic principles of statistical equilibrium and illustrate them through the two-level atom. In a second part, the fundamentals of line radiative transfer are introduced along with the various broadening mechanisms. I explain general solution methods with their drawbacks and also specific difficulties encountered in solving the line radiative transfer equation in disks (e.g. velocity gradients). I am closing with a few special cases of line emission from disks: Radiative pumping, masers and resonance scattering.9th Lecture of the Summer School "Protoplanetary Disks: Theory and Modelling Meet Observations"