The coefficients of the expansion are given by the 6th row of Pascal's triangle, where the top row is row zero, the next is row one, etc.
#color(white)(AAAaaaAAAAAA)1#
#color(white)(AAAAaAAAaA)1color(white)(aa)1#
#color(white)(aaaaaaaa)1color(white)(aa)2color(white)(aa)1#
#color(white)(aaaaaa)1color(white)(aa)3color(white)(aaa)3color(white)(aa)1#
#color(white)(aaaa)1color(white)(aa)4color(white)(aaa)6color(white)(aaa)4color(white)(aa)1#
#color(white)(aa)1color(white)(aaa)5color(white)(aa)10color(white)(aa)10color(white)(aa)5color(white)(aa)1#
#1color(white)(aaa)6color(white)(aa)15color(white)(aa)20color(white)(aa)15color(white)(aa)6color(white)(aa)1#
The coefficients of the 6th row are used because we are expanding to the 6th power. The coefficients are #color(red)1#, #color(red)6#, #color(red)(15)#, #color(red)(20)#, #color(red)(15)#, #color(red)6#, #color(red)1#.
To expand #(x-y)^6#, use the coefficients in front of
# x^6y^0#, #color(white)(aa)x^5y^1#, #color(white)(aa)x^4y^2#, etc.,
with the exponent of #x# starting at 6 and decreasing by one in each term, and the exponent of #y# starting at 0 and increasing by one in each term. Note the sum of the exponents in each term is 6.
Also, starting with #+#, alternate the signs of each term because of the #-y# term in the original binomial. If the binomial to be expanded was #(x+y)#, the signs would all be positive.
#color(red)1x^6y^0-color(red)6x^5y^1+color(red)(15)x^4y^2-color(red)(20)x^3y^3+color(red)(15)x^2y^4-color(red)6x^1y^5+color(red)1x^0y^6#
Simplifying gives
#x^6-6x^5y+15x^4y^2-20x^3y^3+15x^2y^4-6xy^5+y^6#