What is tangent to a curve or function? When I read my textbooks or even type "what is a tangent?" on google, I have always got an answer similar to these lines:
"A straight line or plane that touches a curve or curved surface at a point, but if extended does not cross it at that point."
Now when I am thinking about graph of $\sin x$ or $\cos x$, it is very hard for me to believe this definition because if we draw a line touching any point on such curves then either it will cut at some point or touch at (infinitely) many points. So therefore it is very hard for me to believe this concept (or definitions).
Please correct me if I am wrong at any point suggest a better definition in good mathematical framework.
Image in support of question 
 A: If the mathematical definition on Wikipedia feel too abstract, then maybe this animated image can help. It helped me understand what a tangent is, maybe it can help you. 
In the animation (link above), pay no attention to the mathematical formulas nor any of the number vaules. Focus on the line that is gliding along the curve. Remember that it, i.e. the tangent, is a tool to show you how much the function/curve is "rising" or "falling" at that specific point. When you look at the animation notice how the tangent-line shifts color between, 
-$ \bf \color{green} {Green} $: for the parts of the function when its Y-value is increasing, i.e. climbing,
-$ \bf Black$: for the parts of the function when its Y-value is constant, i.e. terrace/ local maximum or minimum point,
-$ \bf \color{red} {Red}$: for the parts of the function when its Y-value is decreasing.
Notice also that the tangent does not have to extend infinity long from its point. In the picture below you will see a (green) tangent-line which can be made to extend further or be shortened, it doesn't matter, since its main function is to show you the angle of the slope at that specific X-value.
Finally here is how my teacher introduced me to tangent lines: "Think of the tangent line as the skis belonging to a person skiing on a curvy mountain (which is your function). The center of the skis are always parallel with the curve, and the skier is always standing perpendicular to the skis." See image below:

A: HINTS:
A geometrical picture. Take curve like a U curve but facing down. Take a straight line rigid stick and place it on the curve to cut it at two points, which are the two roots. Now displace line parallel to itself so the roots approach each other  until they become a single point. The roots are coincident, now you have a point of tangency between curve and the moving line. If you continue the motion further the roots are imaginary, no real roots, no cutting. Most the math of tangency is a symbolic representation of this simple situation. For a coincident root the discriminant of the constitutive quadratic equation has a zero discriminant.  
Choice of different points at tangency result in different slopes to the curve.
