How to simulate a rope?
Create the rope using a string of vertices controlled by a Soft Body simulation and pin the ends to provide some control. Give the 'rope' thickness by adding Skin and Subdivision Surface modifiers and use the Collision bounds of the other objects in the scene to control the thickness to match. This is very similar to How to get the physics engine to wraps a string around the moving part of a motor constraint? but using two control points to control the ends (rather than bonding one end only to a rotating spindle).



Start with a string of vertices - the easiest way of creating this is to add a Path (Add/Curve/Path) and Convert to Mesh (Object/Convert To.../Mesh). Position and sub-divide the mesh so as to space the vertices a similar distance apart to the desired eventual rope thickness (this helps with self-collision as well as controlling the overall behaviour of the 'rope').



To be able to control the rope we need to pin the ends to something (empties) to act as handles. Moving the handles positions the end of the rope. To achieve this, go into Edit mode (Tab) and select just the end vertices of the path.



On the Mesh properties panel, add a new Vertex Group and click Assign so that the 'end' vertices are part of that group. At this point you can rename the group (double-click its name) to something meaningful like 'Pin'.



Select each 'end' vertex in turn, press Ctrl+H to bring up the Hook menu and select Hook to New Object. This will create an Empty at each end of the path.

In Object mode, select the path and add Soft Body Physics in the Physics properties. In the Soft Body Goal settings set the Goal Strength Default to 1.0 and the Goal Settings Stiffness to maximum (0.999). Set the Vertex Group to the 'Pin' vertex group created earlier.



In the Modifiers panel ensure the Hook modifiers are 'above' the Soft Body modifier.



Now, run the simulation and you should have a soft body string connecting the two empties. Moving the empties should affect the string.

To give the rope some thickness, add a Skin modifier and a Subdivision Surface modifier for smoothness. To control the thickness of the rope you can select the vertices in Edit mode and adjust the Radius X and Radius Y properties in the Properties panel (N).



For collision with surfaces, the actual collision occurs with the inner 'core' of vertices of the Soft Body (rather than its Skin), so adjust the Outer collision bounds to match the thickness of the 'rope' to compensate. To prevent the rope from cutting through sharp edges, enable 'Edges' collision in the Soft Body Edges properties panel.



Care needs to be taken with the collision to ensure the collision 'zones' from each surface do not 'leak out' of the opposite side of the mesh. See soft body collision considerations for further detail.

For self-collision, enable the Soft Body Self Collision settings and adjust the Ball Size to suit the thickness of the rope (this controls the 'size' of each vertex in relation to the length of it's connected edges - hence why spacing the vertices close to the thickness of the eventual rope is helpful).



Moving the empties along a path will now 'drag' the rope and this can produce the following results :



Blend file included 



You can calm the softbody simulation to stop it wiggling around so much by adjusting the soft body parameters - for example, by increasing the damping or, in this case, increasing the Friction :



This takes some of the energy out of the motion of the rope, damping down its movement :





To texture the rope you can use Generated coordinates. The Generated coordinates are distorted to match the animation, following the motion. For example, consider the following material :



This uses the Generated X coordinate to determine the distance along the rope and uses the Maths Arctangent to convert the Y/Z coordinates into the angle around the circumference of the rope. These are combined and passed into Color Ramp nodes to generate the twists around the rope. This can then be used to generate a Normal using the Bump node and/or passed into the Displacement socket of the material to use the (experimental) True Displacement feature to displace the surface.

This can produce the following result :



Blend file including displacement 

(Note : Blend file has soft body Edge colllision and self collision disabled to drastically increase speed of simulation - re-enable by clicking Edges in Soft Body Edges properties and re-enable Soft Body Self Collision)