For example there's a curve $y=X^2-4X+7$ and a line $L: Y=mX-2$. Both never intersect at any given point. If we were to find the set of values of $m$ for which $L$ does not meet the curve, the solution will be as follows
$$mX-2=X^2-4X+7$$
$$X^2-4X-mX+2+7=0$$
$$X^2-(4+m)X+9=0$$
Now here my teacher sets the inequality $b^2-4ac<0$.
$$(4+m)^2-36<0 $$
$$(4+m)^2<36$$
$$-6<(4+m)<6$$
$$-10<m<2$$
My question is why when a curve and a line do not intersect each other then the above inequality is set to further solve it. Is $b^2-4ac<0$ when two lines don't meet?
Please also explain whether this inequality is set only when a curve and a line do not meet.
It's because setting $b^2-4ac < 0$ means that the quadratic equation has no real solution. As for why this is the case, you most likely know the Quadratic Formula:
Clearly, there will be no real solutions when the radicand or discriminant, $b^2-4ac$, is a negative value. Similarly, if one solution is required, the discriminant must equal $0$ (the curve and line intersect at one point only), and if two are required, then it must be a positive value (the curve and the line intersect at two points).
In the context of the given question, this means the line and the parabola never intersect at any point.