How to get from $x^{p-1}-1$ to $(x-1)(x^{p-2}+x^{p-3}+\cdots+x+1)$? How would I get from $x^{p-1}-1$ to $(x-1)(x^{p-2}+x^{p-3}+\cdots+x+1)$? 
It make sense to me logically. When one multiplies it out, it would condense to $x^{p-1}-1$. But it's just not clicking. What is the arithmetic between these steps?

First of all, we might as well set
$n = p - 1, \tag 1$
and then investigate the equation
$x^n - 1 \overset{?}{=} (x - 1)(x^{n - 1} + x^{n - 2} + \ldots + x + 1) = (x - 1)\displaystyle \sum_0^{n - 1} x^i. \tag 2$
One may in fact use a simple induction to validate (2); we check
$n = 1: \; x^1 - 1 = x^1 - 1 = (x - 1) \displaystyle \sum_0^0 x^i, \tag 3$
$n = 2: \; x^2 - 1 = (x - 1)(x + 1) = (x - 1)\displaystyle \sum_0^1 x^i, \tag 4$
$n = 3: \; x^3 - 1 = (x - 1)(x^2 + x + 1) = (x - 1)\displaystyle \sum_0^2 x^i;  \tag 5$
now if
$\exists k \in \Bbb N, \; x^k - 1 = (x - 1)\displaystyle \sum_0^{k - 1} x ^i, \tag 6$
we have
$x^{k + 1} - 1 = x^{k + 1} - x^k + x^k - 1 = (x - 1)x ^k + x^k - 1, \tag 7$
and then using (6),
$x^{k + 1} - 1 = (x - 1)x ^k + (x - 1)\displaystyle \sum_0^{k - 1} x ^i, \tag 8$
whence
$x^{k + 1} - 1 = (x - 1) \left (x ^k + \displaystyle \sum_0^{k - 1} x ^i \right ) = (x - 1) \displaystyle \sum_0^k x ^i, \tag 9$
which shows inductively that (2) must bind.
As far as performing the actual aritmetical/algebraic operations required above is concerned, it is easy to write them out explicitly for equations (3)-(5), viz
$(x - 1)(x + 1) = x(x + 1) - 1(x + 1) = x^2 + x - x - 1 = x^2 - 1; \tag{10}$
it is apparent that the distributive law is used critically here, allowing us as it does to write both the first equality in (10) as well as
$x(x + 1) = x^2 + x \; \text{etc}; \tag{11}$
in fact, the distributive law is tacitly invoked in (7)-(9); indeed, it plays a central role in performing the arithmetic necessary to establish (2).
