Every university introductory physics course considers the problem of Atwoods machine taking into account the mass of the pulley. In the usual treatment the tensions at the two ends of the string are offhandedly taken to act on the pulley and be responsible for its rotation. However such a free-body diagram of the forces on the pulley is not {it a priori} justified, inducing students to construct wrong hypotheses such as that the string transfers its tension to the pulley or that some symmetry is in operation. We reexamine this problem by integrating the contact forces between each element of the string and the pulley and show that although the pulley does behave as if the tensions were acting on it, this comes only as the end result of a detailed analysis. We also address the question of how much friction is needed to prevent the string from slipping over the pulley. Finally, we deal with the case in which the string is on the verge of sliding and show that this will never happen unless certain conditions are met by the coefficient of friction and the masses involved.