An electrostatic generator is like a magic machine that can create electricity from nothing!
Imagine you have a balloon that you rub on your hair. When you rub the balloon, it creates a static charge that makes your hair stand up! This static charge is similar to the electricity that powers your toys and lights at home, but it's too small to be useful.
An electrostatic generator works like the balloon, but on a much larger scale. It uses mechanical energy, like turning a handle or a belt, to move a belt made of a special material called an insulator. This insulator material is like the balloon - it can hold on to a static charge.
The belt passes by some metal plates that are connected to wires. When the belt rubs against the metal plates, it creates a static charge that moves through the wires and creates electricity! This is why an electrostatic generator is sometimes called a 'friction machine' - the friction of the belt against the plates creates the electricity.
Electrostatic generators were used a long time ago to create sparks for fire-making and experiments. Today, they are used in some scientific and industrial processes, but they have mostly been replaced by other types of generators that are more efficient and practical for modern use.