Energy is stored in an electric field through capacitors, where the work done to charge the capacitor from zero to a charge Q0 is given by W = (1/2)(Q0^2/C), representing the energy stored in the electric field between the plates. In magnetic fields, inductors store energy as current flows through them, with the work required to increase the current from I to I+dI calculated as W = (1/2)LI0^2, reflecting the energy stored in the magnetic field of the coil. Gravitational fields store energy based on the height of an object above a reference point, with potential energy calculated as U = mgh, where m is mass, g is gravitational acceleration, and h is height. Each field has distinct mechanisms for energy storage, emphasizing the principles of work and resistance in electric and magnetic systems. Understanding these concepts is crucial for applications in electrical engineering and physics.