Write (a+b)3 as three brackets: (a+b)(a+b)(a+b). To make one term of the product, you pick either a or b from each bracket and multiply your picks. Picking b from exactly one bracket gives a2b, and there are 3 ways to do that: from the first, second or third bracket. Picking b from exactly two brackets gives ab2, also in 3 ways. All a's or all b's can happen only one way each. So (a+b)3=a3+3a2b+3ab2+b3.
That counting is the whole theorem. The coefficient of an−kbk is the number of ways to choose which k of the n brackets supply a b, and that number is (kn). The coefficients line up as the rows of Pascal's triangle, where each entry is the sum of the two above it. Row 4 is 1, 4, 6, 4, 1, so (a+b)4=a4+4a3b+6a2b2+4ab3+b4.
The tempting shortcut (a+b)2=a2+b2 fails: with a=b=1 the left side is 4 and the right side is 2. The missing 2 is the cross term 2ab, which comes from picking a from one bracket and b from the other. The theorem also needs one binomial raised to a power. A product of different brackets, like (x+3)(x−2), has no repeated factor to count choices from, so you simply distribute.
Think of it like this. Expanding (a+b)n is like placing n orders at a counter where each order is either an apple or a banana. Every possible sequence of orders is one term, and the coefficient of an−kbk counts the sequences with exactly k bananas. The picture covers whole-number powers only; negative or fractional powers need an infinite series instead.
Core idea. The binomial theorem expands (a+b)n by counting, with (kn), how many ways each term arises.