A current flowing in a wire creates a magnetic field around the wire.
This concept is used in an electromagnet.
Wrap a wire around the iron nail and turned into a coil and then connect it to a battery. This system is called an electromagnet.
By adding the more turns to the coil or increasing the current in the coil, you can make an electromagnet more stronger.
Iron is used in an electromagnet as it easily gain magnetic properties. When the current is flowing in the coil then it will be easily gain magnetic properties and when the current is stopped then it will loose magnetic properties.
Yes, this is a random error generating because of statistical constraint. We only have finite number of data points. As per this, if we plot our observation we will get a gaussian (inverse bell ) shaped curve with mean equal to central value.