Magnetohydrodynamics Of Accretion To Rotating Magnetized Stars