Lenz's law
Lenz's law tells you which way an induced current flows. The induced current flows in the direction that opposes the change in magnetic flux (the amount of magnetic field) through the coil. So when a magnet comes closer, the coil makes a field that pushes it away, and when the magnet moves away, the coil makes a field that pulls it back.
Formulas
When to use it
Use it when you need the direction of the induced current as a magnet goes into or out of a coil, or the force (repulsion or attraction) between the magnet and the coil.
Worked example
Bring the N pole of a magnet toward the left side of a coil. The flux through the coil pointing to the right increases, so the coil drives a current that makes its left end an N pole to fight that increase. Like poles face each other, so the coil repels the magnet. If you pull the N pole away instead, the left end of the coil becomes an S pole and attracts the magnet.
Common mistake
Many students memorize that the induced field is always opposite to the magnet's field. When the magnet moves away and the flux decreases, the coil has to resist the decrease, so the induced field points the same way as the magnet's field.