The finite group (or profinite) topology was first introduced for the free group by M. Hall Jr. and by Reutenauer for free monoids. This is the initial topology defined by all the monoid morphisms from the free monoid into a discrete finite group. The p-adic topology is defined in the same way by replacing "group" by "p-group" in the definition. In this paper we study the properties of these topologies and their connexions with the theory of formal languages.