Although the reference to Ribes and Zalesski (given in another answer) is excellent, another very good staring point for this area is:

A. Brumer, Pseudocompact algebras, profinite groups and class formations , J. Alg, 4, (1966), 442–470. 

The key point is the pseudocompactness of the result. Brumer goes into the homological algebra of these algebras.  Of course, in the 45 years since that was published there have been a lot of advances, but the basic theory is very well explained there.