Secondly, domains which are aligned with the field will expand to take over regions occupied by domains aligned opposite to the field. This is what is meant by magnetizing a piece of iron. Iron comes in two forms, hard and soft. In hard iron, the domains will not shift back to their starting points when the field is taken away. In soft iron, the domains return to being randomly aligned when the field is removed.
Hard iron is used in permanent magnets.
To make a permanent magnet, a piece of hard iron is placed in a magnetic field. The domains align with the field, and retain a good deal of that alignment when the field is removed, resulting in a magnet. It's easy to make an electromagnet. The answer is that when the domains in the nail align with the field produced by the current, the magnetic field is magnified by a large factor, typically by 100 - 1000 times. Magnetic effects are sensitive to temperature.