This review presents a systematic account of the theory of the muon spin rotation method of studying type II superconductors. Experimental investigations of the vortex structure and antiferromagnetism in high-$T_c$ superconductors are discussed and analyzed. Theoretical studies show that the parameters of the vortex structure and of the superconductor itself can be determined reliably only by using single crystal samples. Data obtained from polycrystalline samples at present can only provide a qualitative analysis. Theory shows that to obtain the required information with single-crystal high-$T_c$ superconductors it is best to use two orientations of the external magnetic field: along the axis of anisotropy and perpendicular to it. The theory that has been developed makes it possible to analyze the behavior of the spin polarization of the muon and to determine the parameters of the vortex structure, both for an ideal lattice, and in the case of strong pinning. Experimental results of a study of antiferromagnetic states in high-$T_c$ ceramics are analyzed and promising directions of research are pointed out.