The easiest way to find is the direction of friction between two contacting bodies is to consider the direction of sliding (i.e. relative movement).
The key concept is that there needs to be relative movement between two surfaces (during the rolling of the wheel there is no relative movement, therefore in the direction of movement of a free rolling wheel there is no friction).
Also, it is important to note that there does not have to be actual sliding. Even if there are resultant forces towards a direction, which could cause sliding, then that force direction could be considered the direction of sliding (actually you would have had sliding if not for the friction).
The direction of friction is always opposite to the direction of sliding.
Q How is direction of friction going to be opposite to mg or in upwards direction ?
mg would move the bicycle downwards (ie. it would slide against the wall if there was no friction.
Why not: In case of like circular turning , direction of friction is toward the centre. Why is it not the same here ?
In circular turning the reaction is vertical and unless there is superelevation does not contribute to turning. In the death well, the reaction from the floor is what actually turns the motorcycle.
Online it says that when f=mg , then only net force is towards the centre. How is that possible ? Normal is pushing the bike. How is it still on the track then if f and mg cancel out.
The normal force is the net force and from Newton's laws:
$$\sum F = m \cdot a$$
For a constant velocity, the only acceleration is the centripetal acceleration. So the normal force from the side of the death well is what keeps the motor on track.
Friction should be in a direction opposite to motion I.e since the bike is moving forward I,e towards you in picture. Then , friction should be backwards.
This statement is completely wrong. When a wheel is turning without sliding then there is no friction. In order to visualize this consider the following. Imagine you are pedaling with a bike on a flat surface, then stop to pedal.
- if the wheel is rolling freely you will go a long way.
- if you hit hard on the brakes then the wheel will slide on the floor. On that case you have friction between the wheels and the flat surface.
In the case no 1. eventually you will stop only because of the deformation of the wheel, not because of the friction on between the wheel and the surface.