In geometry, a tangent line is one that intersects a circle at exactly one point, just "grazing the edge" of it. (It comes from the Latin word tangere, "to touch.") Compare to secant.
In trigonometry, the tangent (tan) function is so named because of this geometric representation. If you draw a unit circle on a pair of coordinate axes and then add a line segment out from its center, that line will strike the unit circle at one point. The ycoordinate of that point is the sine of the angle formed by the line segment, and its xcoordinate is the cosine of the angle.
cosine
_/\_
/ \
__________ _
/  /\ \
/  /  \ } sine
  /   _/
________________/______________
  
  
\  /
\__________/


If you extend this line segment beyond the unit circle, far enough that you can drop a vertical line that is tangent to the circle, you create a new triangle which is similar to the one inside the unit circle:
/
 / 
_________/ 
/  /\ 
/  /  \
  /  
________________/______________
  
  
\  /
\__________/


Because the triangles are similar, the ratios of their sides are equal. Since we are dealing with a unit circle, its radius is 1. Therefore the length of the tangent segment (divided by 1) equals the ratio of the sine to the cosine.