With a squirrel-cage induction motor, you can feed energy into an active supply simply by driving the motor above the synchronous speed. The power flow will reverse at the stator terminals. You can not easily and reliably use an induction motor as a stand-alone generator.
You can find on the internet instructions for using capacitors with an induction motor to make a stand-alone generator system, but those types of systems are not entirely satisfactory. The capacitor value and the load both have an effect on the generated voltage. Every time you start the system, you need to perform a starting sequence such as: first charge the capacitors from some external source, then connect them to the motor with a switch, then connect the load. You may need to increase the driving speed after you establish operation. If you connect or disconnect load items, you may need to add or remove capacitors.
If the motor is energized through an inverter, it is possible to design a satisfactory stand-alone system, but you still need an external battery or other source to get it started. The electronic system will be fairly complex.
Additional information re real and reactive power
An induction generator needs magnetizing current to operate. The magnetizing current does not represent real power but current that is out of phase with the voltage and causes energy to circulate back and forth between the source and the motor. Capacitors can be used for that purpose, but they need to be "tuned" to the motor and load. If the induction generator is connected to an AC source, that source can supply the magnetizing current (reactive volt-amperes), while the generator supplies power (watts) to the load.
I don't know if I'm too tired to see what's wrong in my question, but I'm indeed asking for the generator. which is the same component as the motor, only put in motion by something external at a speed higher than the synchronous. The problem is that generators GENERATE power, all I'm asking is where this power is. on the stator winding? how can it be, if there's already the excitation there? – user3149593 2 hours ago
I think it should be safe to assume that we are talking about a squirrel-cage induction motor. Wound rotor motors are included in electric machinery texts and courses, but they are almost never used compared to the many millions of induction motors in use.
Power in AC circuits is all about the phase relationship between voltage and current. To make things simple, we can assume that the current coming from the AC source is 90 degrees out of phase with the voltage and thus no real power comes from the source. The current in the load can be assumed to be in phase with the voltage. The current in the induction machine is the sum of the two. That is the mechanism that causes the power to come totally from the induction machine even though it is receiving magnetizing current from the AC source. That assumes just the right generated voltage. With the right driving speed, you can assure that no real power is taken from the source.