Are magnetic field lines level sets? I have been learning a bit about level sets. After doing this, I looked at a diagram of magnetic field lines and noticed they don't intersect rather like the lines on closed curve level sets.
My Question:
Are magnetic field lines level sets?
 A: I guess you mean a level set? No, they're not.
Magnetic field lines (which aren't real, but which we use to describe the vector strength of the magnetic field in a region of space) don't cross because the region around the crossing would have nonzero divergence, forbidden by Maxwell's equations.
In regions of space where the magnetic field has zero curl — that is, in regions without free currents, bound currents, or time-varying electric fields — it's possible to construct a magnetic scalar potential whose gradient is the strength and direction of the magnetic field.  Surfaces (not lines) where this potential has constant value are called "equipotential surfaces" and do form a level set in the way that you ask about.  Likewise in the absence of time-varying magnetic fields you can use an "electric potential" to describe the electric field; the electric field is the gradient of the potential and points perpendicular to any equipotential surface.
A: No (or at least, not in three or more spatial dimensions).  The reason is simple: in $d$ dimensions, level sets are $d-1$ dimensional surfaces.  In particular, in two dimensions, level sets are lines, but in three dimensions, they're planes.  But in any dimension, magnetic field lines are just lines, and therefore can't be level sets in three or more spatial dimensions.
If, for the sake of argument, we were to consider only magnetic fields in two dimensions, then I believe that magnetic field lines in the presence of no magnetic sources can be thought of as level sets.
It is also conceivable that a generalized notion of level sets exists that defines level sets as lines in any dimension, but if such a notion exists I'm not familiar with it.
