If you glue two elastic bars together end to end and apply a lengthwise force to them, the force will make each of them contract or compress according to Hooke's law. The total change in length of the aggregate bar is the sum of the change of length of each of them, so the compound bar follows Hooke's law with a $1/k$ that is the sum of the $1/k$s of the individual bars.
Conversely, if you take a uniform bar and cut it into two identical pieces, the $k$ of each piece must (by symmetry) be twice the original $k$.
By extension of these arguments, for a particular combination of material, cross section, etc. the $k$ of a bar is inversely proportional to its length. The proportionality constant is the modulus of elasticity you find in the second equation.
It is the same as $k\cdot l$, so its unit is $\rm (N/m)\cdot m$, where the meters cancel out and leave only newton. Intuitively, units of force correspond to thinking of it as "if Hooke's law worked for arbitrary large displacements (which it doesn't), how much force would be necessary to compress a bar of this material and thickness to length $0$?"
[This doesn't work if the bar is so long that it starts to buckle under compression, or so short that non-uniformity near its ends begin to matter -- for example, friction with whatever we use to push on the ends might prevent the material from expanding in the lateral direction when we compress it, so it may appear stiffer than it ought to be according to its modulus of elasticity. But it's a valid approximation for a useful range of lengths].