Waves connect all the layers of the Sun, from its interior to the upper atmosphere. It is becoming clear now the important role of magnetic field on the wave propagation. Magnetic field modifies propagation speed of waves, thus affecting the conclusions of helioseismological studies. It can change the direction of the wave propagation, help channeling them straight up to the corona, extending the dynamic and magnetic couplings between all the layers. Modern instruments provide measurements of complex patterns of oscillations in solar active regions and of tiny effects such as temporal oscillations of the magnetic field. The physics of oscillations in a variety of magnetic structures of the Sun is similar to that of pulsations of stars that posses strong magnetic fields, such as roAp stars. All these arguments point toward a need of systematic self-consistent modeling of waves in magnetic structures that is able to take into account the complexity of the magnetic field configurations. In this paper, we describe simulations of this kind, summarize our recent findings and bring together results from the theory and observations.