What is meant by the term, “magnetic field”?

What is meant by the term, “magnetic field”? Why does a composs needle show deflection when brought near a bar magnet?

Magnetic field is the region around a magnet in which a magnetic material experiences a force because of that magnet.

The needle of a compass is actually a small bar magnet. So, when a compass is brought near a bar magnet, the compass needle enters the magnetic field of the bar magnet. Therefore, the needle experiences a force because of the bar magnet and gets deflected.