How to calculate the parameters of a line through two points with homogeneous coordinates $p_1, p_2$? So in my notes it says it is $l=p_1 \times p_2$. I don't quite understand that, for example, suppose the points are $p_1=(1,1,1)$, $p_2=(2,2,1)$. Then the cross product would give a line perpendicular to these points, in other words perpendicular to the plane in orange as seen in the image below:
In 2D, the equation of any line $\ell$ has the form $a x + by + c = 0$.

Similar to one can use homogeneous coordinate $\vec{p} = (x,y,1)$ to represent a point $p = (x,y)$ in 2D, one can use homogeneous coordinates $\vec{\ell} = (a,b,c)$ to represent a line $\ell$ in 2D. The condition that $p$ lies on $\ell$ (i.e. $a x + by + c = 0$ ) can be rewritten as $\vec{\ell} \cdot \vec{p} = 0$.
In short,


  point $p$ lies on line $\ell$ in 2D $\quad\iff\quad$ $\vec{p}$ 
  perpendicular to $\vec{\ell}$  in 3D.


A consequence of this is if $\ell$ is a line passing through 2 points $p_1, p_2$, we will have

$$\vec{\ell}\cdot\vec{p_1} = 0\quad\text{ and }\quad
  \vec{\ell}\cdot\vec{p_2} = 0\quad\implies\quad \vec{\ell} \propto \vec{p_1} \times \vec{p_2}$$

i.e the determination of a line by 2 points in 2D corresponds to cross product of corresponding 3D vectors of homogeneous coordinates.

Another interesting consequence is if $p$ is the intersection of two lines $\ell_1$ and $\ell_2$, then $\vec{p} \propto \vec{\ell}_1 \times \vec{\ell}_2$.

It is this sort of correspondences between geometric operations in 2D and vector
operations in 3D that make homogeneous coordinates useful in analysis of 2D problems.
The cross product $\vec{w}=\vec{u} $ x $ \vec{v}$ is the vector which is orthogonal to $\vec{u}$ and to $\vec{v}$ or in other words, the vector which is orthogonal to the plane defined by the vectors $\vec{u}$ and $ \vec{v}$.