In nano-optics, light is controlled at length scales smaller than the wavelength. Consequently, investigations of photonic nanostructures require a resolution beyond the diffraction limit. Near-field microscopy has been one of the pillars of nano-optics since 1980s, as it can provide the necessary subwavelength resolution. This thesis provides a careful study of the electro-magnetic response of the coated probe which forms the heart of a near-field microscope. With the resulting insights we succeed in performing a new type of nanoscale investigation which involves both magnetic and electric fields at the nanoscale. Firstly, we show that an aperture probe can simultaneously map the two in-plane electric field components of light in a photonic nanostructure. By performing phase-sensitive near-field measurements of both components, we reconstruct the highly structured in-plane polarization state of light in a photonic crystal waveguide, leading to the observation of polarization singularities at the nanoscale. Secondly, we found that a coated probe is sensitive to the out-of-plane component of a magnetic field at optical frequency. Although this magnetic coupling does not lead to a direct detection of the magnetic field, it gives rise to new a type of interaction between probe and sample. By controlling the probe position near a maximum of a rapidly varying magnetic field component of light trapped in a photonic crystal nanocavity, we induce a novel blue-shift of the resonance frequency. In addition, we are able to increase the photon lifetime of the cavity through magnetic interaction. Thirdly, by engineering the geometry of an aperture probe at the nanoscale, we succeed in unambiguously mapping the magnetic field of propagating light in a photonic structure. By using metamaterials concepts, we simultaneously visualize the electric and magnetic component of light with subwavelength resolution and phase sensitivity.