I am looking robust collision detection algorithms and found an awesome book called Realtime Collision Detection by Christer Ericson. I am trying to use a p
here's a similar question
Basically your shape is a polyhedron but that is simply defined as a shape with many faces normally 6. You need to actually be looking for the name tetrahedron which is the classic pyramid shape you have defined in the visual representation above. But the basic answer is taking the normal of your 5 planes (the 4 triangles and one square), and check if they are facing in the same direction of the point in space. If they all return false then your point is inside of the shape. If any one of them returns true then you are outside the shape. This type of test works for most convex shapes because there is no case where the planes are overlapping there normals.
I would say that you understood the most of it. I'm not sure what exactly you mean with "distance". Usually the dotproduct provides the angle between the two vectors. In your case there's one position vector (the point) and one normal vector. Because of the laws of cosine, if the dotproduct is greater 0, the angle between the two vectors is less than 90 degrees. On the other hand, if the product is negative, the angle is greater than 90 degrees. If it's 0, the vectors are orthogonal. So basically it's got nothing to do with distance, but with angles.