(x+y)3 expanded has 4 terms, 1 more than the exponent, x3 x2y xy3 and y3 x is decreasing from 3 to 0 from left to right, as y increases from 0 to 3. Any number or variable to the 0 power is 1.
Then you need the coefficients for each of the 4 terms. You can read that off Pascal's triangle:
1, 3, 3 and 1 are the coefficients that go with each of the 4 terms to get
x3 + 3x2y + 3xy2 + y3
Each number in Pascal's triangle is the sum of the 2 digits just above it, to the right & left.