General Principles of Magnetic Confinement