Your first example is wrong. Multiplication has the same precedence as division. So whatever comes first, is evaluated¹.
In you example you have
$$8 / 4 \times 2 = (8 / 4) \times 2 = 2 \times 2 = 4$$
Multiplication and division have higher precedence than, for example, addition or subtraction. Note that addition and subtraction have again the same precedence.
1
: Note that this does not account for parentheses, but they have higher precedence than arithmetic operators, so by the time you have to evaluate multiplication and division there should not be any parentheses lying around.