Physics of pulsar magnetospheres