When do you use the dot product and the cross product?

the dot product (or scalar product) is when you want a scalar answer, just a number that represents how much of one vector is along the other one. A dot B is |A| |B| cos T

where T is the angle between vectors A and B
The cross or vector product is how much the vectors are perpendicular to each other and its magnitude is |A| |B| sin T. HOWEVER it has direction as well as magnitude and is therefore a vector.
It is always perpendicular to the first two vectors and its direction is therefore perpendicular to the plane that A and B lie in. To get the sign of the direction use the right hand rule. Turn the fingers of your right fist from A to B and your thumb is in the direction of the cross product vertor. In rectangular coordinates one way to calculate it is the determinant :
|i______j_____k|
|Ax____Ay____Az|
|Bx____By____Bz|

= i(Ay Bz-AzBy) + j(AzBx-AxBz) + k(AxBy-AyBx)