First, you need to check every triangle. You can speed up that check by building an octree that partitions your 3D-space into managable grid cells. (see
http://en.wikipedia.org/wiki/Octree[
^] or google for tutorials and code how to use it)
For each octree cell, you can precalculate which triangle intersects it and which don't. Then, when you want to check a point, just check which octree cell it is in, and then go on to check which triangles you know intersect that same cell: if you built your octree well, there may only be 3-5 triangles that you actually need to check.
If you want to check whether a point is inside a solid or outside, you need to define a line through that point. If the point is moving, you may use the current direction of movement to define the direction of the line; this will provide additional information. Otherwise the direction is irrelevant, but the calculations will be easier if you use one of the axes, e. g. (1,0,0).
For this line, determine all cells of the octree that it hits. Then, for each cell, check which triangles intersect the cell. For these triangles, intersect the line with the triangle, then check whether the point of intersection actually is inside the boundaries of the triangle.
Count the number of intersection points that lie on one side of your starting point along the line. If that number is odd, then your point is inside the solid. If it is even, then it is outside.