This is a very vast topic and being studied as 2 chapters in class 12. And it becomes a course when you go for higher studies. I really appreciate your enthusiasm for asking this question from class 7.
Only a varying magnetic field induces current.
The exact aspect of this phenomenon and theory can only be explained using calculus. So, you will come to know more about this in your higher classes.