Can you determine an action-reaction pair when tension acts on a string attached to a pulley? I have been learning about tension and was doing some reading on trying to explain these forces at the intermolecular level and later also trying to see how it fits in view of Newton's third law- I did come to certain conclusions but I am not sure if I am understanding them correctly.
As much as I have understood, I gather that on applying a force on either side of a  string the molecules in the string move away from their mean positions and that tension develops as an internal force to try to bring the molecules back to their mean position. Is that a correct explanation?
WRT Newton's third law of motion, consider a block attached to a pulley. When we draw free body diagrams for such systems, we usually indicate tension in two directions on the string. Am I right if I understood that because the block pulls on the string, tension develops in the string as a reaction force - acting on the block(but then how will tension restore the molecules in the rope back to their mean positions ?) and in the same diagram since the pulley exerts a force on the string and a reaction force develops which is the tension in the opposite direction.
But as action and reaction forces should be equal, according to my explanation the same string (let's say massless) will be experiencing different tensions?
What have I understood wrong?
 A: Assuming a massless frictionless pulley, the tension will be the same throughout the string. Suppose a 1 Newton force is applied to the string, its tension will increase to 1 Newton so that it is applying the 1 Newton of force to the block. The string will have 1 Newton of tension throughout the entire length. The force will pull one direction and the block's pull from resistance to moving will be in the opposite direction. So you have equal and opposite forces per Newton's third law of motion, applied by the string which must have equal tension.
A: The action/reaction pair occurs at each place inside the string where one layer of molecules pulls or pushes on an adjacent layer of molecules. Consider two adjacent layers $A$ and $B$:
++++++++++
++++++++++
++++++++++ A
++++++++++ B
++++++++++
++++++++++
If the string is in tension in the vertical direction then layer $A$ exerts up upwards force $F$ on layer $B$, and layer $B$ exerts a downwards force of the same size on layer $A$.
At the bottom of the string, therefore (for a vertical string in tension), the final layer is being pulled upwards by the layer above. And at the top of the string, the uppermost layer is being pulled downwards by the layer below it. If the bottom layer of the string isn't accelerating then it must be being pulled downwards by something else. e.g. it is a stuck to a heavy weight being pulled down by gravity. If the top layer of the string isn't accelerating then it must be being pulled upwards by something else. e.g. it is stuck to the ceiling.
A: To add a bit to the earlier answers.
It is typically assumed that the string is not stressed beyond its elastic limit, so not only does it not break when stressed, it returns to its original length once the stress is removed and the tension in the string is zero.  The material properties of the string determine the maximum stress that can be tolerated for which the string returns to its original length once the stress is removed.   This is similar to stressing a ductile metal such that its yield stress is not exceeded, so the metal is not stressed beyond the elastic into the plastic region. You can read about the details of elastic loading- macroscopic and microscopic- by searching for elastic loading or yield stress on the web.
