In recent years, two-dimensional magnetic materials have attracted a lot of attention due to their unique magnetic properties, which can be manipulated by various degrees of freedom in a van der Waals stacked heterostructure, where different interlayer stackings affect the properties in different ways by exploiting weak interlayer interactions. An interesting example is CrI3, where the interlayer magnetic coupling can be determined by the stacking sequence. Here we present a systematic study of the magnetic properties of monolayer, bilayer, and trilayer CrI3 by using density functional theory and Monte Carlo simulations. The effects of different stacking sequences and the number of layers on the magnetic interaction in multilayer CrI3 have been critically analyzed. We have found that the antiferromagnetic interlayer coupling occurs with specific interlayer shifting, while intralayer exchange interactions increase with the number of layers. It is noteworthy that interlayer interactions are independent of the number of layers, whereas the magnetic ordering temperature rises with the increasing number of layers. Moreover, we present the Curie temperatures obtained from Monte Carlo simulations and adiabatic magnon spectra for all the stacking sequences considered here.