Visit this table of geometric intersection algorithms courtesy of realtimerendering.com, look at the entry for triangle/triangle intersections, and follow the references, for example to Christer Ericson, Real-Time Collision Detection, page 172. (A book which I recommend highly.)
The basic idea is straightforward. If two triangles intersect, then either two edges of one triangle intersect the other (left configuration in the diagram below), or one edge of each triangle intersects the other (right configuration).
So perform six line segment–triangle intersection tests and see if either of these configurations is found.
Now, you ask, how do you do a line segment/triangle intersection test? Well, it’s easy. Visit this table of geometric intersection algorithms, look at the entry for line segment (ray)/triangle intersections, and follow the references…
(It’s important to mention that the simple test outlined above doesn’t handle coplanar triangles correctly. For many applications this does not matter: for example, when detecting a collision between meshes of triangles, the coplanar cases are ambiguous so it does not matter which result is returned. But if your application is one of the exceptions, you’ll need to check for that as a special case, or read on in Ericson for some other methods, for example, the separating-axis method, or Tomas Möller’s interval overlap method.)