The direction of friction How does friction change its direction? What I have learnt till now is that friction opposes the motion of an object. Please explain me the conept of applying friction in free body diagrams when there is relative motion of two objects.
 A: As you mentioned in your answer the definition of friction start and end with this statement 'friction opposes relative motion or seem to make relative motion' for understanding the friction in f.b.d (this example contain both static and kinetic friction.).
Let us take an example suppose you have this question  
As i apply force on lower block with respect to ground ,block will move forward ,which make the friction active , friction start acting back ward.and with respect to upper also the block 1 move forward hence friction act backward,and according to newton third law every action there is equal and opposite reaction,when we write f.b.d for upper since it is moving relatively back with respect to lower hence friction act forward hence practicing more f.b.d you will able to analyse by yourself.
A: At an atomic level, friction represents the energy that is turned into heat as a result of overcoming very many very small attractions between the atoms/molecules of one object and the atoms/molecules of the other object. When one object is moving relative to the other, this heat energy reduces the kinetic energy of the moving object. In order to reduce kinetic energy then friction must always act in the opposite direction to the motion of one object relative to the other.
And Newton's Third Law tells us that if object A exerts a force on object B then object B exerts an equal and opposite force on object A.
Drag forces work (qualitatively) in the same way - a drag force is always in the opposite direction to the direction of motion relative to the surrounding gas or liquid.
A: Friction tries to oppose the relative motion between two bodies.  
If the bodies are not in motion relative to one another then the frictional forces act in such directions so as to keep the bodies from moving relative to one another.  
The diagram below shows two bodies moving at the same speed $v$ relative to the ground which is increasing with an acceleration $a$ due to an external force acting on body $1$.  
 
The frictional forces are shown in the diagram with $F_{12}$ the frictional force on body $1$ due to body $2$ and $F_{21}$  the frictional force on body $2$ due to body $1$.
The two static frictional forces are a Newton third law pair being equal in magnitude and opposite in direction.  
The equation of motion for body $2$, with left as the positive direction, is $F_{21} = m_2\,a$ and for body the equation of motion is $1$ $F-F_{12}= m_2\, a$ 
If the bodies are in motion relative to one another the frictional forces act in such directions so as to reduce the relative motion which will mean increasing the speed of one of the bodies whilst reducing the speed of the other body.  
The diagram below is of two bodies moving at different speeds , $V$ and $v$, relative to the ground with $V>v$.
 
The frictional force $F_{12}$  on body $1$ due to body $2$ is reducing the speed $V$ of body $1$.
The frictional force $F_{21}$  on body $2$ due to body $1$ is increase the speed $v$ of body $2$.
The two dynamic/kinetic frictional forces are a Newton third law pair being equal in magnitude and opposite in direction.
