A magnetic field is the invisible region around a magnet where its force can be detected, and field lines are how we draw it.
Field lines emerge from the north pole, loop around, and merge into the south pole: closer lines mean a stronger field.
A compass needle is just a small bar magnet, free to rotate. Its end pointing north is called the north pole; the end pointing south is the south pole. Like poles repel, unlike poles attract, which is exactly why a compass needle swings and settles near a bar magnet.
Sprinkle iron filings around a bar magnet and tap the board gently: the filings arrange themselves into a clear pattern. This happens because the magnet exerts a force in the region surrounding it: this region is called the magnetic field, and the pattern the filings trace out represents magnetic field lines.
Field lines have a direction: by convention, they emerge from the north pole and curve around to merge into the south pole outside the magnet, and travel from south to north *inside* it, making every field line a closed loop. The direction at any point is simply the direction a compass's north pole would point if placed there.
Where field lines are drawn closer together, the field is stronger; that's why they crowd near the poles. Two field lines can never cross, because a compass placed at a crossing point would have to point in two directions at once, which is impossible.
Key exam points
Watch it explained
Magnetic Field and Field Line | Class 10 | Science | NCERT · GBP - Higher Education (Classes 9 to 12)