Magnetic, electric and gravitational fields are important concepts with similarities and differences. A good understanding of these differences and similarities will deepen the understanding of the three concepts.
Gravitational Field
A gravitational field is due to any object that has a mass because if you place another object nearby, it will be attracted according to the Newton's law of universal gravitation.
Electric Field
Similarly, any charged object creates an electric field because if you place another charge nearby it will be either attracted or repelled.
Magnetic Field
A magnetic field is due to magnetic material or to moving charges. If you place a magnet nearby in a magnetic field (near a magnet for example), it will either be attracted or repelled. Moving charges may also be attracted or repelled by magnets.
The gravitational, electric and magnetic field are vector quantities with both magnitude and direction.