A method of simultaneous analysis of the magnetic and crystalline microstates of superconductors is proposed to find out the specific features of interaction between the crystalline and magnetic microstructures of polycrystalline HTSCs. Qualitatively new results are obtained for samples with different microstructures. For example, regular steps are observed on the magnetic-field dependence of the trapped magnetic flux density Btr(H0) in polycrystalline and epitaxial YBCO films for both increasing and decreasing field. The results of the analysis imply that epitaxial films, as well as bulk and film polycrystalline HTSCs, are "decomposed" into monodomains, crystallites, and subcrystallites with different demagnetization factors. The simultaneous penetration of vortices into crystallites of about the same size and into more regularly arranged subcrystallites gives rise to the above-mentioned steps. As the quality of the samples increases, these steps become more prominent, which is attributed to the enhanced short-range ordering. The absence of steps on Btr(H0) in bulk polycrystalline samples clearly demonstrates the absence of long-range ordering in these samples. It is the vitreousness of the crystalline microstructure of HTSCs that is responsible for the transformations in the vortex system. The similarity of the results obtained in samples with different microstructures points to the universal mechanism of penetration, distribution, and trapping of magnetic flux in these samples. It is found that polycrystalline HTSCs are in fact multistep, rather than two-step, systems. It is shown that the vitreousness of the microstructure of HTSCs and the dense arrangement of twinning boundaries lead to the penetration of magnetic flux in the form of hypervortices into samples and are responsible for the formation of a superconducting glass state on physical principles different from those of the Ebner-Strode model of granulated glass.