The study of the polarization dynamics of two counterpropagating beams in optical fibers has recently been the subject of a growing renewed interest, from both the theoretical and experimental points of view. This system exhibits a phenomenon of polarization attraction, which can be used to achieve a complete polarization of an initially unpolarized signal beam, almost without any loss of energy. Along the same way, an arbitrary polarization state of the signal beam can be controlled and converted into any other desired state of polarization, by adjusting the polarization state of the counterpropagating pump beam. These properties have been demonstrated in various different types of optical fibers, i.e., isotropic fibers, spun fibers, and telecommunication optical fibers. This article is aimed at providing a rather complete understanding of this phenomenon of polarization attraction on the basis of new mathematical techniques recently developed for the study of Hamiltonian singularities. In particular, we show the essential role that play the peculiar topological properties of singular tori in the process of polarization attraction. We provide here a pedagogical introduction to this geometric approach of Hamiltonian singularities and give a unified description of the polarization attraction phenomenon in various types of optical fiber systems.