We show and compare various metallic and dielectric nanostructures for local magnetic field enhancement at optical frequency. We elaborate on the origin of the magnetic field enhancement in each structure and define figures of merit to compare the ability of the structures to enhance the magnetic field. We show that dielectric structures can be a good alternative to their plasmonic counterpart due to their low loss. The magnetic field enhancement of these structures can be utilized in studying magnetic dipole transitions, magnetic imaging, chirality, and enhanced spectroscopy applications.