The standard example is the based loop space $\Omega M$ thought of as the space of continuous maps from $[0,1]$ to $M$ where 0 and 1 are mapped to the base point. This has a product on it given by taking the loop you get from going around one loop and then the other. In other words, if you have loops $f$ and $g$, if $t\in [0,1/2]$, $(fg)(t) = g(2t)$, and if $t\in [1/2,1]$, $(fg)(t) = f(2t-1)$.
It's easy to see that this product is not associative, but it is associative up to a reparametrization of the circle. Thus, there's a homotopy between $f(gh)$ and $(fg)h$ which is a map
$$
[0,1] \times \Omega M^{{}\times 3} \to \Omega M
$$
For four loops, you can draw a pentagon of homotopies:
$$
f(g(hi)) \sim f((gh)i) \sim (f(gh))i \sim ((fg)h)i \sim (fg)(hi) \sim f(g(hi))
$$
Let $K_4$ be the pentagon. This is a map:
$$
\partial K_4 \times \Omega M^{{}\times 4} \to \Omega M
$$
These homotopies are coherent which means that this extends to a map
$$
K_4 \times \Omega M^{{}\times 4} \to \Omega M
$$
This pattern continues and gives Stasheff's Associahedra. A space, $H$, possessing a set of maps (and my memory's not so great here, so I'll assume $i>1$ which might not be correct)
$$
K_i \times H^{{}\times i} \to H
$$
where $K_2 = pt$, $K_3 = [0,1]$, $K_4$ is as above, etc. is called an $A_\infty$-space. It's a theorem of Stasheff that any connected $A_\infty$-space is homotopic to a based loop space.
Now, pass to chains on the space and you get an $A_\infty$ algebra. The theorem of Stasheff is then the statement that the bar construction on an $A_\infty$ algebra is a dg-coalgebra.
This can all be thought of in terms of operads, of course, but I think this all came first. I don't know which introduction of Keller's you're using (he has several), but I believe this is all in this one.