When we put wire around a nail and apply an electric current using a battery then the electric current will create a magnetic field. This is known as the law of electromagnetic induction. The nail will become what is known as an electromagnet. This magnetic field created by the electromagnet will be capable of attracting magnetic materials.
If we increase the number of turns i the coil this will create a stringer magnetic field and therefore, the electromagnet will be capable of attracting more paper clips.