This device is used to create energy from a form of kinetic rotation. The generator itself has to rotate or nothing will come out. You can anchor this by placing it on a hinge created by the surface option in the hammer.
*Must be connected to a Power Cell to make energy. It is recommended to connect an antenna to the power cell so you can use the energy.
See this for all the ways you can generate power.
Due to being abused by many players to create infinite electricity, the generator has been removed from Waste of Space by the 2021-2-28 update.