Generating unlimited electricity through magnets Well i had seen a toy, which i till date don't know was it battery powered or not? and also could it be used to actually create energy (I know that it is not possible but whats the problem?)
Structure of a toy: Imagine a toy man having magnets at his feet, he is fixed to an axle and can just perform a motion in forward or backward direction, and also note that at the base of the man's feet (attached to that axle) is another magnet with same pole as that of the magnet of feet. 
What was happening: What was happening was that the man was continuously performing the motion and not stopping at all.
The thing is that i saw it from a distance and so i could not know that wheter or not it used battery
Questions
Will it stop? Will it generate electricity forever if i put an turbine to at the axle
1. On Earth
2. In outer space
3. Under gravity + No Friction
Well i know the simple answers in of most of them in form of yes/no but Why?
Front View:

 A: I think your question is primarily about modes of energy.  Energy can be broken down into kinetic and potential energy.  This potential can take the form of potential through gravitational (height), chemical (batteries), magnetic field potential etc.
While energy can be neither created or destroyed, it can be transferred from one form to another.  Confusion about this is usually what creates confusion about any system that claims to create unending energy.  You can transfer energy in a multitude of complicated ways in going from input to output.  If you manage these transfers perfectly however, the best you can ever manage is a 1 to 1 transfer.
In your example the kinetic energy of the man is being transferred to magnetic potential energy, then back to kinetic.  Ignoring friction this process could go on forever.  It doesn't break any conservation laws because the energy is just being transferred efficiently.  If we put a 100% efficient generator on the man in order to try to harness his energy we can only ever gain in an equal amount to his kinetic energy.  At which point the man would be stopped and we would net nothing.
In reality, with friction, small amounts of heat and sound are being released as the man rocks back and forth.  Heat and sound require energy, which comes from the kinetic energy of the man.  So eventually, the man would lose all of his kinetic energy and come to a stop.
As to the man's position when he stops, I don't know if we are thinking of the same model.  He should come to rest anywhere that net force equals 0.  I may not understand all of your mechanism so that may be in one of several positions.
A: With a generator of some sort extracting energy from the system, the system will stop in all three cases. By the principle of conservation of energy, you know that the total energy neither increases or decreases through any process. If the generator extracts energy from the system, the man will slow down and eventually stop. Intuitively, this is because of resistance in the generator. Even in an ideal world without friction, turning a magnet within a coil of wire (in order to generate an EMF in the coil) requires a constant force due to the retarding electromagnetic forces on the generator. (Consider science museum demonstrations in which you turn a wheel to light a light bulb. The wheel can be really tough to turn, and that's primarily because of electromagnetic force, not just friction.)
Without a turbine, the question is marginally more interesting. In any environment with friction, the man will stop - again, since friction extracts energy from the system, it must slow down and eventually come to a halt. Only in the last case - the frictionless environment without a turbine - will the man perpetually remain in motion. Of course, this is a physically implausible situation, since any mechanical system will have at least some amount of friction.
A: In fully ideal situation when there's no dampening force (like friction), the setup would never stop. But, when you start to produce electricity with it, there'd be work done against it and the setup would stop. The setup isn't producing energy by any way. You take out energy in the form of electricity, it'll kill motion of setup. That's it.
