How does a coil generate electricity?

Like in a generator, there are coils which generate electricity when rotated rapidly. Why is this? What law is this? Thanks.
3 answers 3