The magnetic field lines and magnetic flux are explained below:
Einstein is said to have been fascinated by a compass as a child, perhaps musing on how the needle felt a force without direct physical contact. His ability to think deeply and clearly about action at a distance, particularly for gravitational, electric, and magnetic forces, later enabled him to create his revolutionary theory of relativity. Since magnetic forces act at a distance, we define a magnetic field to represent magnetic forces. The pictorial representation of magnetic field lines is very useful in visualizing the strength and direction of the magnetic field. As shown in [link], the direction of magnetic field lines is defined to be the direction in which the north end of a compass needle points. The magnetic field is traditionally called the B-field.
Magnetic flux is a measurement of the total magnetic field which passes through a given area. It is a useful tool for helping describe the effects of the magnetic force on something occupying a given area. The measurement of magnetic flux is tied to the particular area chosen. We can choose to make the area any size we want and orient it in any way relative to the magnetic field.
If we use the field-line picture of a magnetic field then every field line passing through the given area contributes some magnetic flux. The angle at which the field line intersects the area is also important. A field line passing through at a glancing angle will only contribute a small component of the field to the magnetic flux. When calculating the magnetic flux we include only the component of the magnetic field vector which is normal to our test area.
If we choose a simple flat surface with area AAA as our test area and there is an angle \thetaθtheta between the normal to the surface and a magnetic field vector (magnitude BBB) then the magnetic flux is, BAcosθ