The problems of the three-dimensional (3D) plasma confinement systems optimization based on choice of a proper topology of the module B lines on magnetic surface is considered. This approach developed in recent years is connected with the fact that in spite of the 3D structure of the confining magnetic field in the stellarator and mirror with quadrupole stabilizers, an essential properties of the equilibrium and the guiding center drift depend mainly on module B distribution on magnetic surfaces. Selecting the system with the “quasisymmetric” distribution of module B one could to avoid or to make weaker unfavourable effects of the 3-D systems: the island structure and large neoclassical transport. The theoretical base for this approach is discussed.