how do we know that it is an contact and non-contact force?
Contact forces can be defined as the forces which can be applied on an object only when it is in contact with the object. For example: Frictional force.
Non-contact forces can be defined as the forces which can be applied on the object without contact with the object. For example: Gravitational force.
It is very simple to see whether a force is touching the object or not.
@ Ujwal: Nice!