Multiscale phenomena which include several processes occuring simultaneously at different length scales and exchanging energy with each other, are widespread in magnetism. These phenomena often govern the magnetization reversal dynamics, and their correct modeling is important. In the present paper, we propose an approach to multiscale modeling of magnets, applying the ideas of coarse graining. We have analyzed the choice of the weighting function used in coarse graining, and propose an optimal form for this function. Simple tests provide evidence that this approach may be useful for modeling of realistic magnetic systems. 75.40.Mg, 75.10.Hk, 05.70.Ln, 75.70.Cn A large number of phenomena taking place in magnets include processes occuring simultaneously at different length scales. A good example is the magnetization reversal in a macroscopic piece of magnetic material possessing different kinds of defects, voids, surfaces etc. The reversal starts by a nucleation of a domain with the magnetization opposite to the initial direction. As a rule, the nucleation happens near defects, where spins can be frustrated. Here, the different length scales involved can be clearly identified. First, there is the microscopic scale with a characteristic length of the order of several interatomic distances (several tens of angstroms), which corresponds to the region of spin frustration and contains the microstructure in the vicinity of the defect. Next, there is a "micromagnetic" length scale (of order of the domain wall width, several thousands of angstroms) where the formation of the general structure of the nucleus takes place. And, finally, the truly macroscopic length scale (of order of several microns or even millimeters), where the magnons created in the course of the reversal propagate. These magnons play an important role in energy transfer [1] and sometimes can initiate the magnetization reversal in other areas of the sample [2]. A similar picture of several interacting length scales appears in many situations, such as the breakthrough of a domain wall pinned by a defect [3], influence of the surface on the magnetic structure of the core of a magnetic particle [4] etc.Processes of this type, called multiscale processes, are receiving considerable attention nowadays. Along with very interesting and rich physics, these are the very processes which govern the switching behavior of magnetic systems (coercive field, switching time, etc.), so that an adequate understanding of multiscale phenomena is of paramount importance for development and creation of new magnetic storage media. Micromagnetic simulations can provide a realistic description of the processes taking place at both micromagnetic and macroscopic length scales. On the other hand, microscopic inhomogeneities require atomistic simulations (e.g., spin dynamics modeling [5] is an adequate tool for materials where spins are well localized at the sites of the crystalline lattice). However, for the description of real systems, all the length scales should be coupled, ...