Pulsars are rotating magnetized neutron stars that emit
broadband pulses of radiation. Our ability to model magnetospheres of pulsars has been hampered by the difficulty of solving the self-consistent behavior of strongly magnetized relativistic plasmas. I will describe
recent progress in numerical modeling of magnetically-dominated plasmas and show applications to pulsar magnetospheres in increasing levels of realism, including ideal and resistive force-free,
relativistic MHD and kinetic models. The knowledge of the magnetospheric shape together with the new observations of gamma-ray emission from pulsars with Fermi telescope allow to directly constrain the location and physics of the acceleration regions in the magnetosphere and the origin of high energy emission. The pulsar magnetosphere is a prototype for other strongly magnetized
astrophysical objects, and I will discuss how the lessons from pulsar modeling can be useful in predicting EM counterparts to gravitational wave sources.