Newelski and Pillay proved that, in a NIP theory, topological dynamics applied to the action of a fsg group $G(M)$ on its type space $S_{G}(M)$ gives rise to, and can explain, the quotient $G/G^{00}$. After a brief recall of the theory of compact semigroups, I will describe the main ideas of their papers.