Filamentary structure is a fundamental property of the magnetized solar plasma. Recent high-resolution observations and numerical simulations have revealed close links between the filamentary structures and plasma dynamics in large-scale solar phenomena, such as sunspots and magnetic network. A new emerging paradigm is that the mechanisms of the filamentary structuring and large-scale organization are natural consequences of turbulent magnetoconvection on the Sun. We present results of 3D radiative MHD large-eddy simulations (LES) of magnetic structures in the turbulent convective boundary layer of the Sun. The results show how the initial relatively weak and uniformly distributed magnetic field forms the filamentary structures, which under certain conditions gets organized on larger scales, creating stable long-living magnetic structures. We discuss the physics of magnetic self-organization in the turbulent solar plasma, and compare the simulation results with observations.