As the comments have already pointed out the two equations are related but not the same. The first equation represents the "magnetic force on a straight wire segment" due to a magnetic field $B$. That is to say, if you had a wire carrying current $I$ and "immersed it", as you put it, into a magnetic field of strength $B$, the force experienced by the wire is
$\vec{F} = I \vec{l} \times \vec{B} $
and the magnitude is given by $I l B sin \theta$, and the $sin \theta$ just comes from the cross product.
As you know $I$ is scalar but this force is a cross product so you use the direction the current is flowing in, denoted by $\vec{l}$, to figure out the direction. If needed I can provide the derivation of this equation, but I'd just be copy/pasting out of my book University Physics by Young and Freedman, Chp 27 section 27.6.
Now, if you are given a nice constant magnetic field, you can insert it into this equation and be done. But if you need to derive what the magnetic field is, due to some current carrying wire(s), solenoid, etc. you need to use Biot-Savart or Ampere's Law.
In general you get this from computing:
$\vec{B} = \frac{\mu_0}{4 \pi} \int \frac{I d\vec{l} \times \vec{r}}{r^2}$
So to get the force on a current carrying wire, from say another current carrying wire, you'd really need to do this:
$\vec{F} = I \vec{l} \times \frac{\mu_0}{4 \pi} \int \frac{I d\vec{l} \times \vec{r}}{r^2}$