After a review of basic laws in electromagnetism, the main numerical methods for the analysis of magnetic field will be presented.