It's called the difference of cubes, as 8=2^3. There is also the sum of cubes, it works much the same way.

(x-2)(x^2_____+4)

You know that x*x^2=x^3 and -2*4=-8. So now you just need to remember what to use for the middle term. Remember that the sign of the middle term in the trinomial will be the opposite of the operation in the first term. As you are doing the difference of cubes, the first binomial will have subtraction, and the middle term of the trinomial will be addition.

(x-2)(x^2 + ____+4)=x^3-8

Right now if you distribute you would have

x^3+___ +4x-2x^2-____-8. The middle term needs to get rid of the 4x and the -2x^2. So we need in those blanks -4x and 2x^2. If you factor both of those terms you get -2*2x and x*2x. So the middle term is 2x.

(x-2)(x^2+2x+4)

The difference of cubes: (a-b)(a^2+ab+b^2)

The sum of cubes: (a+b)(a^2-ab+b^2)