The macroscopical Ginzburg-Landau models with effective-mass tensor and Josephson coupling of the layers are used to describe the magnetic properties of layered superconductors (dichalcogenides of transition metals and intercalated compounds, organic superconductors and high-Tc copper oxide compounds). In the framework of such models the magnetic critical fields, Abrikosov lattice, torque, Josephson oscillations, Gaussian fluctuations are considered and the validity of mean field theory in the model with Josephson coupling is discussed. The layeredcompounds with different superconducting layers are also studied including the dependence of critical temperature on the strength of coupling and temperature dependence of magnetic anisotropy. The experimental data of high-Tc superconductors are discussed to show that in Bi- and Tl-compounds the conditions of Josephson coupling of layers is fulfilled.