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$.
Tasos' answer above is the simplest answer to the question. With this approach you do not have to address the details of the interaction between the string and the pulley. This is a great example of how picking the appropriate system (here the pulley with the string) leads to a simpler evaluation. This assumes no slip between the string and the surface of the pulley.