Question: How is tension in a string able to apply torque on a pulley? How does string itself able to apply a force on pulley? What is happening inside the pulley?

The pulley has a mass $m$ and is a disc.

Answer: 
In the context of most ideal pulley problems, it's assumed that the string or rope doesn't slip along the surface of the pulley, so the pulley's edge moves along with the string. This could be called a static friction force, however, the value of that force doesn't come into account unless it's the specific focus of some problem. What matters in most contexts is that 1) it's tangential to the pulley, and 2) it's always big enough. 

Since the edge of a pulley is essentially bound to the string along it, then any force that the pulley exerts on the string (and vise-versa) along the tangent of the pulley is parallel to the length of the string, so it interacts with the tension in the string. Of course, if the pulley has no external torque applied to it (and if it were massless), then it wouldn't do anything, and the tension in the string would be balanced by the tension in the string on the other side of the pulley.

[Torque](http://en.wikipedia.org/wiki/Torque) is a force applied about a fulcrum, either a fixed rotational center or a center of mass. Since the force from a string is tangent to the pulley, the torque is $\tau=rF\sin\frac{\pi}{2}=rF$.
Consider the pulley together with the segment of the string that touches it as a single object with
the same moment of inertia as that of the pulley, since the string is massless. As far as the angular
acceleration of this object is concerned, one is allowed to disregard the internal forces between
the aforesaid segment of the string and the pulley, and now T1 and T2 are actually external forces
responsible for the net external torque on the pulley-string segment system.See:

<https://www.researchgate.net/publication/318107848_Force_and_torque_of_a_string_on_a_pulley>