In general, friction refers to reactions or natural phenomenas (interm of force[s]) that will arise when a real object (or something that is abstract in nature, for example an activity, action, or work) touches, moves, or changes places in or on a medium (air, water, asphalt, ets). Whatever its form, this phenomenon can be small (insignificant until it is often ignored) or large enough (to be considered significant and must be taken into account).
In the scientific world (natural law), the direction of friction of real object will always be considered opposite to the direction of motion or displacement of the object. This is very dominant. Meanwhile, beyond that, especially for abstract objects, the direction of the friction is not always opposite to the direction of the movement or displacement.
In the real world, in fact, objects that move in the air media also get friction which is called air resistance (drag) so that it affects the motion of a basketball or vollyball (for example), but in some cases this type of friction is ignored. Meanwhile, objects moving on the road surface (asphalt) will get two frictions (opposite forces); beause it moves in the air medium and also touches the road surface. In this case, what is considered significant is the friction because it touches (moves) on the road surface. Meanwhile, for abstract cases, for example "collecting trash on the street", what will emerge is community support; not the friction that we often encounter in the literal sense although this is also a friction as per the definition above.
Part of the purpose of friction is: (1) to show humans that every action, chages, or movement must have a reaction (which is usually an) obstacle (small or big), and (2) to ensure that motivation, resources, and/or the power (interm of forces) possessed is sufficient to fullfill its purpose ("moving" system, model, or real/abstract object).