The structural, electronic and magnetic properties of Fe7S8 material have been studied within the framework of the ab-initio calculations, the mean field approximation (MFA) and Monte Carlo simulation (MCS). Our study shows that two forms of the iron atoms, Fe2+ with spin S=2, and Fe3+ with spin {sigma}=5/2 are the most probable configurations. A mixed Ising model with ferromagnetic spin coupling between Fe2+ and Fe3+ ions and between Fe3+ and Fe3+ ions, and with antiferromagnetic spin coupling between Fe2+ ions of adjacent layers has been used to study the magnetic properties of this compound. We demonstrated that the magnetic phase transition can be either of the first or of the second order, depending on the value of the exchange interaction and crystal field. The presence of vacancies in every second iron layer leads to incomplete cancellation of magnetic moments, hence to the emergence of the ferrimagnetism. Anomalies in the magnetization behavior have been found and compared with the experimental results.