This is called substitution.
Here are the steps in detail:
You want to make two replacements: $u=x^3$ and $du=3x^2 dx$. But you don't have $3x^2 dx$ in your integral. No matter, construct it! Starting with what you have:
$$\int x^2e^{x^3}dx $$
multiply by 1=3/3:
$$= \frac{3}{3}\int x^2e^{x^3}dx $$
move the 3 inside of the integral and move $x^2$ next to the $dx$:
$$= \frac{1}{3}\int e^{x^3}3x^2dx$$
Then make two replacements: $u=x^3$ and $du=3x^2 dx$.
$$ =\frac{1}{3}\int e^u du$$
These replacements are compatible with each other because if you differentiate $u=x^3$ you get $du=3x^2 dx$. In general, if what you are looking to substitute ($3x^2 dx$ in this case) differs only by a constant from what you have ($x^2 dx$) , you can introduce the constant you need by putting 1 over that constant "outside" the integral.
Your best bet is to do another very similar example right away so that this concept will solidify for you. Best!