What you need to do is use a mathematical tool called the 'cross product,' which is an operator that takes two vectors and produces a vector that is perpendicular to both of them (or more correctly, perpendicular to the plane that the two vectors define.
pseudo C# code:
Vector3 p1 = new Vector3(0,0,0);
Vector3 p2 = new Vector3(1,0,0);
Vector3 p3 = new Vector3(0,1,0);
Vector3 vec1 = p2 - p1; // create vector leading from p1 to p2
Vector3 vec2 = p3 - p1; // create vector leading from p1 to p3
Vector3 result = Mathf.Cross(vec1, vec2);
Note that there are two vectors that are valid results, the one coming out of the plane, and the one going the other direction from the other side of the plane. Reversing the order in the Cross() function will give the other vector.