Theory of Electromagnetic Well Logging