Magnetic Interactions in Molecules and Solids