An electrical generator converts mechanical energy into electrical energy through electromagnetic induction, providing a crucial source of power for various applications. There are two main types of generators, AC and DC, each serving different functions in homes, industries, and backup systems during power outages. Key components of generators include the stator, rotor, field windings, and armature, which work together to produce electricity efficiently.