The magnet and its properties of attracting a piece of iron by exerting a magnetic force on it and causing a compass needle to be deflected are well known.
Magnets made from certain types of steel and alloys of aluminium, nickel and titanium etc retain their magnetism more or less permanently. Such magnets find many uses in radio equipment such as in moving coil meters, headphones and loudspeakers.
An electric current flowing through a straight wire creates a magnetic field around it, the lines of force of which are in a plane perpendicular to the wire and concentric with the wire.
The magnetic field surrounding such a straight wire is relatively weak, but a strong magnetic field can be produced by a current if, instead of a straight wire, a coil of wire or 'solenoid' is used; moreover, the field can be greatly strengthened if a piece of soft iron or other magnetic material (known as a 'core') is placed inside the coil.
The magnetic field produced by a solenoid is indeed similar to that produced by a bar magnet and it exhibits identical properties.
The extent by which the strength of the solenoid magnet is increased by the introduction of the core is called the 'permeability' of the core material. Permeability is really the ratio of the number of lines of force (or flux density) in the magnetic core to the flux density in a vacuum (ie no magnetic core). The difference between a vacuum and an air core is so small that it is ignored. As it is a ratio, strictly it should be referred to as 'relative permeability', but the word 'relative' is often omitted colloquially.
The strength of a magnetic field produced by a current is directly proportional to the current. It also depends on the number of turns of wire, the area of the coil and the permeability of the core.