An electromagnetic field is a physical field produced by electrically charged objects. It affects the behavior of charged objects in the vicinity of the field. The electromagnetic field extends indefinitely throughout space and describes the electromagnetic interaction. It consists of two components: the electric field and the magnetic field.
The electric field is created by electric charges and is present around any electrically charged object. It exerts a force on other charged objects within its vicinity. The strength and direction of the electric field at any point are determined by the magnitude and location of the electric charges creating the field.
The magnetic field is created by moving electric charges or intrinsic magnetic dipoles in magnetic materials. It exerts a force on moving charged particles and magnetic materials within its vicinity. The strength and direction of the magnetic field at any point are determined by the motion and orientation of the charges or dipoles creating the field.
When an electric field and a magnetic field change with time, they can generate electromagnetic waves. These waves carry energy and can travel through a vacuum. Examples of electromagnetic waves include radio waves, microwaves, infrared radiation, visible light, ultraviolet radiation, X-rays, and gamma rays.