When two surfaces are in contact, the contact force between them can be resolved into two parts. The component perpendicular (normal) to the surface is the normal reaction, and the component along the surface, that is tangential to it, is friction. The definition given in the question specifies a force that is tangential to the surface and that opposes sliding, and that is precisely the frictional force.
Friction arises from the interlocking of microscopic irregularities and from attraction between the molecules of the two surfaces at the points where they genuinely touch. It always acts along the surface and always in the direction that opposes relative sliding, or the tendency to slide, which is why a stationary block on a rough incline does not slip and why a pushed box eventually stops. For a body on the point of sliding, \(F = \mu R\), where \(R\) is the normal reaction and \(\mu\) the coefficient of friction, a relation which itself shows that friction and the normal reaction are two distinct, mutually perpendicular quantities.
The normal force is the tempting alternative, but it acts at right angles to the surface and pushes the body away from the surface; it supports the body rather than resisting its sliding. Weight, \(W = mg\), is the gravitational pull of the Earth and acts vertically downwards regardless of any surface, so it is not tangential except in the special case of a vertical wall. Upthrust is the upward force a fluid exerts on a body immersed in it, again vertical and not a surface-contact tangential force. In the examination, use the direction words as your key: perpendicular to the surface means normal reaction, along the surface means friction.